@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
|
@@ -151,7 +151,7 @@ export function SanityChecks_validateColumn(column) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export function SanityChecks_validate(headers, values, raiseException) {
|
|
154
|
-
let clo;
|
|
154
|
+
let clo, clo_1;
|
|
155
155
|
let isValid = true;
|
|
156
156
|
let en = getEnumerator(values);
|
|
157
157
|
while (isValid && en["System.Collections.IEnumerator.MoveNext"]()) {
|
|
@@ -162,12 +162,23 @@ export function SanityChecks_validate(headers, values, raiseException) {
|
|
|
162
162
|
let copyOfStruct_1 = en["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
163
163
|
cell = copyOfStruct_1[1];
|
|
164
164
|
const header = headers[matchValue[0]];
|
|
165
|
-
|
|
165
|
+
const headerIsData = header.IsDataColumn;
|
|
166
|
+
const headerIsFreetext = !header.IsTermColumn && !header.IsDataColumn;
|
|
167
|
+
const cellIsNotFreetext = !cell.isFreeText;
|
|
168
|
+
if (headerIsData && (!cell.isData && cellIsNotFreetext)) {
|
|
166
169
|
(raiseException ? ((message) => {
|
|
167
170
|
throw new Error(message);
|
|
168
171
|
}) : ((clo = toConsole(printf("%s")), (arg) => {
|
|
169
172
|
clo(arg);
|
|
170
|
-
})))(`Invalid combination of header \`${header}\` and cell \`${cell}
|
|
173
|
+
})))(`Invalid combination of header \`${header}\` and cell \`${cell}\`. Data header should contain either Data or Freetext cells.`);
|
|
174
|
+
isValid = false;
|
|
175
|
+
}
|
|
176
|
+
if (headerIsFreetext && cellIsNotFreetext) {
|
|
177
|
+
(raiseException ? ((message_1) => {
|
|
178
|
+
throw new Error(message_1);
|
|
179
|
+
}) : ((clo_1 = toConsole(printf("%s")), (arg_1) => {
|
|
180
|
+
clo_1(arg_1);
|
|
181
|
+
})))(`Invalid combination of header \`${header}\` and cell \`${cell}\`. Freetext header should not contain non-freetext cells.`);
|
|
171
182
|
isValid = false;
|
|
172
183
|
}
|
|
173
184
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
2
|
import { OntologyAnnotation_$reflection, OntologyAnnotation } from "../OntologyAnnotation.js";
|
|
3
|
+
import { Data_$reflection, Data } from "../Data.js";
|
|
3
4
|
import { Union } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
4
5
|
import { union_type, string_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
5
6
|
|
|
@@ -10,7 +11,7 @@ export class CompositeCell extends Union {
|
|
|
10
11
|
this.fields = fields;
|
|
11
12
|
}
|
|
12
13
|
cases() {
|
|
13
|
-
return ["Term", "FreeText", "Unitized"];
|
|
14
|
+
return ["Term", "FreeText", "Unitized", "Data"];
|
|
14
15
|
}
|
|
15
16
|
get isUnitized() {
|
|
16
17
|
const this$ = this;
|
|
@@ -24,9 +25,13 @@ export class CompositeCell extends Union {
|
|
|
24
25
|
const this$ = this;
|
|
25
26
|
return this$.tag === 1;
|
|
26
27
|
}
|
|
28
|
+
get isData() {
|
|
29
|
+
const this$ = this;
|
|
30
|
+
return this$.tag === 3;
|
|
31
|
+
}
|
|
27
32
|
GetEmptyCell() {
|
|
28
33
|
const this$ = this;
|
|
29
|
-
return (this$.tag === 2) ? CompositeCell.emptyUnitized : ((this$.tag === 1) ? CompositeCell.emptyFreeText : CompositeCell.emptyTerm);
|
|
34
|
+
return (this$.tag === 2) ? CompositeCell.emptyUnitized : ((this$.tag === 1) ? CompositeCell.emptyFreeText : ((this$.tag === 3) ? CompositeCell.emptyData : CompositeCell.emptyTerm));
|
|
30
35
|
}
|
|
31
36
|
GetContent() {
|
|
32
37
|
const this$ = this;
|
|
@@ -39,21 +44,43 @@ export class CompositeCell extends Union {
|
|
|
39
44
|
const oa_1 = this$.fields[1];
|
|
40
45
|
return [this$.fields[0], oa_1.NameText, defaultArg(oa_1.TermSourceREF, ""), defaultArg(oa_1.TermAccessionNumber, "")];
|
|
41
46
|
}
|
|
47
|
+
case 3: {
|
|
48
|
+
const d = this$.fields[0];
|
|
49
|
+
return [defaultArg(d.Name, ""), defaultArg(d.Format, ""), defaultArg(d.SelectorFormat, "")];
|
|
50
|
+
}
|
|
42
51
|
default:
|
|
43
52
|
return [this$.fields[0]];
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
ToUnitizedCell() {
|
|
47
56
|
const this$ = this;
|
|
48
|
-
|
|
57
|
+
switch (this$.tag) {
|
|
58
|
+
case 1:
|
|
59
|
+
return new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0])]);
|
|
60
|
+
case 0:
|
|
61
|
+
return new CompositeCell(2, ["", this$.fields[0]]);
|
|
62
|
+
case 3:
|
|
63
|
+
throw new Error("Data cell cannot be converted to Unitized cell.");
|
|
64
|
+
default:
|
|
65
|
+
return this$;
|
|
66
|
+
}
|
|
49
67
|
}
|
|
50
68
|
ToTermCell() {
|
|
51
69
|
const this$ = this;
|
|
52
|
-
|
|
70
|
+
switch (this$.tag) {
|
|
71
|
+
case 2:
|
|
72
|
+
return new CompositeCell(0, [this$.fields[1]]);
|
|
73
|
+
case 1:
|
|
74
|
+
return new CompositeCell(0, [OntologyAnnotation.create(this$.fields[0])]);
|
|
75
|
+
case 3:
|
|
76
|
+
throw new Error("Data cell cannot be converted to Term cell.");
|
|
77
|
+
default:
|
|
78
|
+
return this$;
|
|
79
|
+
}
|
|
53
80
|
}
|
|
54
81
|
ToFreeTextCell() {
|
|
55
82
|
const this$ = this;
|
|
56
|
-
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : this$);
|
|
83
|
+
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : ((this$.tag === 3) ? (new CompositeCell(1, [defaultArg(this$.fields[0].Name, "")])) : this$));
|
|
57
84
|
}
|
|
58
85
|
get AsUnitized() {
|
|
59
86
|
const this$ = this;
|
|
@@ -70,7 +97,7 @@ export class CompositeCell extends Union {
|
|
|
70
97
|
return this$.fields[0];
|
|
71
98
|
}
|
|
72
99
|
else {
|
|
73
|
-
throw new Error("Not a
|
|
100
|
+
throw new Error("Not a Term Cell.");
|
|
74
101
|
}
|
|
75
102
|
}
|
|
76
103
|
get AsFreeText() {
|
|
@@ -79,7 +106,16 @@ export class CompositeCell extends Union {
|
|
|
79
106
|
return this$.fields[0];
|
|
80
107
|
}
|
|
81
108
|
else {
|
|
82
|
-
throw new Error("Not a
|
|
109
|
+
throw new Error("Not a FreeText Cell.");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
get AsData() {
|
|
113
|
+
const this$ = this;
|
|
114
|
+
if (this$.tag === 3) {
|
|
115
|
+
return this$.fields[0];
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new Error("Not a Data Cell.");
|
|
83
119
|
}
|
|
84
120
|
}
|
|
85
121
|
static createTerm(oa) {
|
|
@@ -98,6 +134,12 @@ export class CompositeCell extends Union {
|
|
|
98
134
|
static createFreeText(value) {
|
|
99
135
|
return new CompositeCell(1, [value]);
|
|
100
136
|
}
|
|
137
|
+
static createData(d) {
|
|
138
|
+
return new CompositeCell(3, [d]);
|
|
139
|
+
}
|
|
140
|
+
static createDataFromString(value, format, selectorFormat) {
|
|
141
|
+
return new CompositeCell(3, [Data.create(void 0, value, void 0, format, selectorFormat)]);
|
|
142
|
+
}
|
|
101
143
|
static get emptyTerm() {
|
|
102
144
|
return new CompositeCell(0, [new OntologyAnnotation()]);
|
|
103
145
|
}
|
|
@@ -107,16 +149,28 @@ export class CompositeCell extends Union {
|
|
|
107
149
|
static get emptyUnitized() {
|
|
108
150
|
return new CompositeCell(2, ["", new OntologyAnnotation()]);
|
|
109
151
|
}
|
|
152
|
+
static get emptyData() {
|
|
153
|
+
return new CompositeCell(3, [Data.create()]);
|
|
154
|
+
}
|
|
110
155
|
UpdateWithOA(oa) {
|
|
111
156
|
const this$ = this;
|
|
112
|
-
|
|
157
|
+
switch (this$.tag) {
|
|
158
|
+
case 2:
|
|
159
|
+
return CompositeCell.createUnitized(this$.fields[0], oa);
|
|
160
|
+
case 1:
|
|
161
|
+
return CompositeCell.createFreeText(oa.NameText);
|
|
162
|
+
case 3:
|
|
163
|
+
throw new Error("Data cell cannot be updated with OntologyAnnotation.");
|
|
164
|
+
default:
|
|
165
|
+
return CompositeCell.createTerm(oa);
|
|
166
|
+
}
|
|
113
167
|
}
|
|
114
168
|
static updateWithOA(oa, cell) {
|
|
115
169
|
return cell.UpdateWithOA(oa);
|
|
116
170
|
}
|
|
117
171
|
toString() {
|
|
118
172
|
const this$ = this;
|
|
119
|
-
return (this$.tag === 1) ? this$.fields[0] : ((this$.tag === 2) ? (`${this$.fields[0]} ${this$.fields[1].NameText}`) : (`${this$.fields[0].NameText}`));
|
|
173
|
+
return (this$.tag === 1) ? this$.fields[0] : ((this$.tag === 2) ? (`${this$.fields[0]} ${this$.fields[1].NameText}`) : ((this$.tag === 3) ? (`${this$.fields[0].NameText}`) : (`${this$.fields[0].NameText}`)));
|
|
120
174
|
}
|
|
121
175
|
static term(oa) {
|
|
122
176
|
return new CompositeCell(0, [oa]);
|
|
@@ -127,9 +181,12 @@ export class CompositeCell extends Union {
|
|
|
127
181
|
static unitized(v, oa) {
|
|
128
182
|
return new CompositeCell(2, [v, oa]);
|
|
129
183
|
}
|
|
184
|
+
static data(d) {
|
|
185
|
+
return new CompositeCell(3, [d]);
|
|
186
|
+
}
|
|
130
187
|
}
|
|
131
188
|
|
|
132
189
|
export function CompositeCell_$reflection() {
|
|
133
|
-
return union_type("ARCtrl.CompositeCell", [], CompositeCell, () => [[["Item", OntologyAnnotation_$reflection()]], [["Item", string_type]], [["Item1", string_type], ["Item2", OntologyAnnotation_$reflection()]]]);
|
|
190
|
+
return union_type("ARCtrl.CompositeCell", [], CompositeCell, () => [[["Item", OntologyAnnotation_$reflection()]], [["Item", string_type]], [["Item1", string_type], ["Item2", OntologyAnnotation_$reflection()]], [["Item", Data_$reflection()]]]);
|
|
134
191
|
}
|
|
135
192
|
|
|
@@ -23,6 +23,15 @@ export class CompositeColumn extends Record {
|
|
|
23
23
|
if (cells.length === 0) {
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
|
+
else if (header.IsDataColumn && (item(0, cells).isData ? true : item(0, cells).isFreeText)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
else if (header.IsDataColumn) {
|
|
30
|
+
if (raiseExeption) {
|
|
31
|
+
throw new Error(`Invalid combination of header \`${header}\` and cells \`${item(0, cells)}\`, Data header should have either Data or Freetext cells`);
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
26
35
|
else if (header.IsTermColumn && (item(0, cells).isTerm ? true : item(0, cells).isUnitized)) {
|
|
27
36
|
return true;
|
|
28
37
|
}
|
|
@@ -13,10 +13,10 @@ export class IOType extends Union {
|
|
|
13
13
|
this.fields = fields;
|
|
14
14
|
}
|
|
15
15
|
cases() {
|
|
16
|
-
return ["Source", "Sample", "
|
|
16
|
+
return ["Source", "Sample", "Data", "Material", "FreeText"];
|
|
17
17
|
}
|
|
18
18
|
static get All() {
|
|
19
|
-
return [new IOType(0, []), new IOType(1, []), new IOType(2, []), new IOType(3, [])
|
|
19
|
+
return [new IOType(0, []), new IOType(1, []), new IOType(2, []), new IOType(3, [])];
|
|
20
20
|
}
|
|
21
21
|
static get Cases() {
|
|
22
22
|
return map((x) => [x.tag, name(x)], getUnionCases(IOType_$reflection()));
|
|
@@ -27,7 +27,7 @@ export class IOType extends Union {
|
|
|
27
27
|
let copyOfStruct;
|
|
28
28
|
return `Input [${(copyOfStruct = x, toString(copyOfStruct))}]`;
|
|
29
29
|
};
|
|
30
|
-
return (this$.tag ===
|
|
30
|
+
return (this$.tag === 4) ? stringCreate(this$.fields[0]) : stringCreate(this$);
|
|
31
31
|
}
|
|
32
32
|
get asOutput() {
|
|
33
33
|
const this$ = this;
|
|
@@ -35,49 +35,17 @@ export class IOType extends Union {
|
|
|
35
35
|
let copyOfStruct;
|
|
36
36
|
return `Output [${(copyOfStruct = x, toString(copyOfStruct))}]`;
|
|
37
37
|
};
|
|
38
|
-
return (this$.tag ===
|
|
38
|
+
return (this$.tag === 4) ? stringCreate(this$.fields[0]) : stringCreate(this$);
|
|
39
39
|
}
|
|
40
40
|
Merge(other) {
|
|
41
41
|
const this$ = this;
|
|
42
42
|
switch (this$.tag) {
|
|
43
|
-
case 4:
|
|
44
|
-
switch (other.tag) {
|
|
45
|
-
case 0:
|
|
46
|
-
return new IOType(4, []);
|
|
47
|
-
case 2:
|
|
48
|
-
return new IOType(4, []);
|
|
49
|
-
case 3:
|
|
50
|
-
return new IOType(4, []);
|
|
51
|
-
case 4:
|
|
52
|
-
return new IOType(4, []);
|
|
53
|
-
default:
|
|
54
|
-
throw new Error(`ImageFile IO column and ${other} can not be merged`);
|
|
55
|
-
}
|
|
56
|
-
case 3:
|
|
57
|
-
switch (other.tag) {
|
|
58
|
-
case 0:
|
|
59
|
-
return new IOType(3, []);
|
|
60
|
-
case 2:
|
|
61
|
-
return new IOType(3, []);
|
|
62
|
-
case 3:
|
|
63
|
-
return new IOType(3, []);
|
|
64
|
-
case 4:
|
|
65
|
-
return new IOType(4, []);
|
|
66
|
-
default:
|
|
67
|
-
throw new Error(`DerivedDataFile IO column and ${other} can not be merged`);
|
|
68
|
-
}
|
|
69
43
|
case 2:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
case 3:
|
|
76
|
-
return new IOType(3, []);
|
|
77
|
-
case 4:
|
|
78
|
-
return new IOType(4, []);
|
|
79
|
-
default:
|
|
80
|
-
throw new Error(`RawDataFile IO column and ${other} can not be merged`);
|
|
44
|
+
if (other.tag === 0) {
|
|
45
|
+
return new IOType(2, []);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error(`Data IO column and ${other} can not be merged`);
|
|
81
49
|
}
|
|
82
50
|
case 1:
|
|
83
51
|
switch (other.tag) {
|
|
@@ -90,19 +58,19 @@ export class IOType extends Union {
|
|
|
90
58
|
}
|
|
91
59
|
case 0:
|
|
92
60
|
return (other.tag === 0) ? (new IOType(0, [])) : other;
|
|
93
|
-
case
|
|
61
|
+
case 3:
|
|
94
62
|
switch (other.tag) {
|
|
95
63
|
case 0:
|
|
96
|
-
return new IOType(
|
|
97
|
-
case
|
|
98
|
-
return new IOType(
|
|
64
|
+
return new IOType(3, []);
|
|
65
|
+
case 3:
|
|
66
|
+
return new IOType(3, []);
|
|
99
67
|
default:
|
|
100
68
|
throw new Error(`Material IO column and ${other} can not be merged`);
|
|
101
69
|
}
|
|
102
70
|
default:
|
|
103
|
-
if (other.tag ===
|
|
71
|
+
if (other.tag === 4) {
|
|
104
72
|
if (this$.fields[0] === other.fields[0]) {
|
|
105
|
-
return new IOType(
|
|
73
|
+
return new IOType(4, [this$.fields[0]]);
|
|
106
74
|
}
|
|
107
75
|
else {
|
|
108
76
|
throw new Error(`FreeText IO column names ${this$.fields[0]} and ${other.fields[0]} do differ`);
|
|
@@ -115,10 +83,10 @@ export class IOType extends Union {
|
|
|
115
83
|
}
|
|
116
84
|
toString() {
|
|
117
85
|
const this$ = this;
|
|
118
|
-
return (this$.tag === 1) ? "Sample Name" : ((this$.tag === 2) ? "
|
|
86
|
+
return (this$.tag === 1) ? "Sample Name" : ((this$.tag === 2) ? "Data" : ((this$.tag === 3) ? "Material" : ((this$.tag === 4) ? this$.fields[0] : "Source Name")));
|
|
119
87
|
}
|
|
120
88
|
static ofString(str) {
|
|
121
|
-
return (str === "Source") ? (new IOType(0, [])) : ((str === "Source Name") ? (new IOType(0, [])) : ((str === "Sample") ? (new IOType(1, [])) : ((str === "Sample Name") ? (new IOType(1, [])) : ((str === "RawDataFile") ? (new IOType(2, [])) : ((str === "Raw Data File") ? (new IOType(2, [])) : ((str === "DerivedDataFile") ? (new IOType(
|
|
89
|
+
return (str === "Source") ? (new IOType(0, [])) : ((str === "Source Name") ? (new IOType(0, [])) : ((str === "Sample") ? (new IOType(1, [])) : ((str === "Sample Name") ? (new IOType(1, [])) : ((str === "RawDataFile") ? (new IOType(2, [])) : ((str === "Raw Data File") ? (new IOType(2, [])) : ((str === "DerivedDataFile") ? (new IOType(2, [])) : ((str === "Derived Data File") ? (new IOType(2, [])) : ((str === "ImageFile") ? (new IOType(2, [])) : ((str === "Image File") ? (new IOType(2, [])) : ((str === "Data") ? (new IOType(2, [])) : ((str === "Material") ? (new IOType(3, [])) : (new IOType(4, [str])))))))))))));
|
|
122
90
|
}
|
|
123
91
|
static tryOfHeaderString(str) {
|
|
124
92
|
const matchValue = tryParseIOTypeHeader(str);
|
|
@@ -173,18 +141,10 @@ export class IOType extends Union {
|
|
|
173
141
|
break;
|
|
174
142
|
}
|
|
175
143
|
case 3: {
|
|
176
|
-
matchResult = 3;
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
case 4: {
|
|
180
|
-
matchResult = 4;
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
case 5: {
|
|
184
144
|
matchResult = 5;
|
|
185
145
|
break;
|
|
186
146
|
}
|
|
187
|
-
case
|
|
147
|
+
case 4: {
|
|
188
148
|
matchResult = 6;
|
|
189
149
|
break;
|
|
190
150
|
}
|
|
@@ -217,25 +177,19 @@ export class IOType extends Union {
|
|
|
217
177
|
static sample() {
|
|
218
178
|
return new IOType(1, []);
|
|
219
179
|
}
|
|
220
|
-
static
|
|
180
|
+
static data() {
|
|
221
181
|
return new IOType(2, []);
|
|
222
182
|
}
|
|
223
|
-
static derivedDataFile() {
|
|
224
|
-
return new IOType(3, []);
|
|
225
|
-
}
|
|
226
|
-
static imageFile() {
|
|
227
|
-
return new IOType(4, []);
|
|
228
|
-
}
|
|
229
183
|
static material() {
|
|
230
|
-
return new IOType(
|
|
184
|
+
return new IOType(3, []);
|
|
231
185
|
}
|
|
232
186
|
static freeText(s) {
|
|
233
|
-
return new IOType(
|
|
187
|
+
return new IOType(4, [s]);
|
|
234
188
|
}
|
|
235
189
|
}
|
|
236
190
|
|
|
237
191
|
export function IOType_$reflection() {
|
|
238
|
-
return union_type("ARCtrl.IOType", [], IOType, () => [[], [], [], [], [
|
|
192
|
+
return union_type("ARCtrl.IOType", [], IOType, () => [[], [], [], [], [["Item", string_type]]]);
|
|
239
193
|
}
|
|
240
194
|
|
|
241
195
|
export class CompositeHeader extends Union {
|
|
@@ -369,6 +323,42 @@ export class CompositeHeader extends Union {
|
|
|
369
323
|
return false;
|
|
370
324
|
}
|
|
371
325
|
}
|
|
326
|
+
get IsDataColumn() {
|
|
327
|
+
const this$ = this;
|
|
328
|
+
let matchResult, anythingElse;
|
|
329
|
+
switch (this$.tag) {
|
|
330
|
+
case 11: {
|
|
331
|
+
if (this$.fields[0].tag === 2) {
|
|
332
|
+
matchResult = 0;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
matchResult = 1;
|
|
336
|
+
anythingElse = this$;
|
|
337
|
+
}
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
case 12: {
|
|
341
|
+
if (this$.fields[0].tag === 2) {
|
|
342
|
+
matchResult = 0;
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
matchResult = 1;
|
|
346
|
+
anythingElse = this$;
|
|
347
|
+
}
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
default: {
|
|
351
|
+
matchResult = 1;
|
|
352
|
+
anythingElse = this$;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
switch (matchResult) {
|
|
356
|
+
case 0:
|
|
357
|
+
return true;
|
|
358
|
+
default:
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
372
362
|
get IsFeaturedColumn() {
|
|
373
363
|
const this$ = this;
|
|
374
364
|
return this$.tag === 4;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { CompositeHeader, IOType } from "./CompositeHeader.js";
|
|
2
|
+
import { OntologyAnnotation } from "../OntologyAnnotation.js";
|
|
3
|
+
import { exists as exists_1, ofArray } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { exists } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
5
|
+
import { arrayHash, equalArrays, safeHash, equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
6
|
+
import { printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
|
+
import { SanityChecks_validate } from "./ArcTableAux.js";
|
|
8
|
+
import { ArcTable } from "./ArcTable.js";
|
|
9
|
+
import { class_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
10
|
+
import { Dictionary } from "../../fable_modules/fable-library-js.4.16.0/MutableMap.js";
|
|
11
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
|
+
|
|
13
|
+
export const DataMapAux_dataHeader = new CompositeHeader(11, [new IOType(2, [])]);
|
|
14
|
+
|
|
15
|
+
export const DataMapAux_explication = new OntologyAnnotation("Clarification", "NCIT", "http://purl.obolibrary.org/obo/NCIT_C94778");
|
|
16
|
+
|
|
17
|
+
export const DataMapAux_explicationHeader = new CompositeHeader(3, [DataMapAux_explication]);
|
|
18
|
+
|
|
19
|
+
export const DataMapAux_unit = new OntologyAnnotation("Unit", "UO", "http://purl.obolibrary.org/obo/UO_0000000");
|
|
20
|
+
|
|
21
|
+
export const DataMapAux_unitHeader = new CompositeHeader(3, [DataMapAux_unit]);
|
|
22
|
+
|
|
23
|
+
export const DataMapAux_objectType = new OntologyAnnotation("Data Type", "NCIT", "http://purl.obolibrary.org/obo/NCIT_C42645");
|
|
24
|
+
|
|
25
|
+
export const DataMapAux_objectTypeHeader = new CompositeHeader(3, [DataMapAux_objectType]);
|
|
26
|
+
|
|
27
|
+
export const DataMapAux_descriptionHeader = new CompositeHeader(13, ["Description"]);
|
|
28
|
+
|
|
29
|
+
export const DataMapAux_generatedByHeader = new CompositeHeader(13, ["Generated By"]);
|
|
30
|
+
|
|
31
|
+
export const DataMapAux_allowedHeaders = ofArray([DataMapAux_dataHeader, DataMapAux_explicationHeader, DataMapAux_unitHeader, DataMapAux_objectTypeHeader, DataMapAux_descriptionHeader, DataMapAux_generatedByHeader]);
|
|
32
|
+
|
|
33
|
+
export function DataMapAux_validate(headers, values, raiseException) {
|
|
34
|
+
if (exists((h) => {
|
|
35
|
+
const hasForeignHeader = !exists_1((ah) => equals(ah, h), DataMapAux_allowedHeaders);
|
|
36
|
+
if (raiseException && hasForeignHeader) {
|
|
37
|
+
toFail(printf("Header %O is not allowed in DataMap"))(h);
|
|
38
|
+
}
|
|
39
|
+
return hasForeignHeader;
|
|
40
|
+
}, headers)) {
|
|
41
|
+
return SanityChecks_validate(headers, values, raiseException);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class DataMap {
|
|
49
|
+
constructor(headers, values) {
|
|
50
|
+
DataMapAux_validate(headers, values, true);
|
|
51
|
+
this.table = (new ArcTable("DataMap", headers, values));
|
|
52
|
+
this.staticHash = 0;
|
|
53
|
+
}
|
|
54
|
+
Equals(obj) {
|
|
55
|
+
let dm;
|
|
56
|
+
const this$ = this;
|
|
57
|
+
return (obj instanceof DataMap) && ((dm = obj, equals(DataMap__get_Table(this$), DataMap__get_Table(dm))));
|
|
58
|
+
}
|
|
59
|
+
GetHashCode() {
|
|
60
|
+
const this$ = this;
|
|
61
|
+
return safeHash(DataMap__get_Table(this$)) | 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function DataMap_$reflection() {
|
|
66
|
+
return class_type("ARCtrl.DataMap", void 0, DataMap);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function DataMap_$ctor_ZD0829CB(headers, values) {
|
|
70
|
+
return new DataMap(headers, values);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function DataMap__get_Headers(this$) {
|
|
74
|
+
return this$.table.Headers;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function DataMap__get_Values(this$) {
|
|
78
|
+
return this$.table.Values;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function DataMap__get_StaticHash(this$) {
|
|
82
|
+
return this$.staticHash;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function DataMap__set_StaticHash_Z524259A4(this$, value) {
|
|
86
|
+
this$.staticHash = (value | 0);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function DataMap_init() {
|
|
90
|
+
return DataMap_$ctor_ZD0829CB([], new Dictionary([], {
|
|
91
|
+
Equals: equalArrays,
|
|
92
|
+
GetHashCode: arrayHash,
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function DataMap__AddColumns_6369C010(this$, columns, skipFillMissing) {
|
|
97
|
+
columns.forEach((c) => {
|
|
98
|
+
c.Validate(true);
|
|
99
|
+
});
|
|
100
|
+
this$.table.AddColumns(columns, void 0, void 0, unwrap(skipFillMissing));
|
|
101
|
+
DataMapAux_validate(this$.table.Headers, this$.table.Values, true);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function DataMap_addColumns_6369C010(columns, skipFillMissing) {
|
|
105
|
+
return (dm) => {
|
|
106
|
+
const dm_1 = DataMap__Copy(dm);
|
|
107
|
+
DataMap__AddColumns_6369C010(dm_1, columns, unwrap(skipFillMissing));
|
|
108
|
+
return dm_1;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function DataMap__get_Table(this$) {
|
|
113
|
+
return this$.table;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function DataMap__TryGetCellAt_Z37302880(this$, row, column) {
|
|
117
|
+
return this$.table.TryGetCellAt(row, column);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function DataMap__GetExplicationColumn(this$) {
|
|
121
|
+
return this$.table.GetColumnByHeader(DataMapAux_explicationHeader);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function DataMap__AddExplicationColumn_C98E589(this$, cells) {
|
|
125
|
+
this$.table.AddColumn(DataMapAux_explicationHeader, cells);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function DataMap__GetUnitColumn(this$) {
|
|
129
|
+
return this$.table.GetColumnByHeader(DataMapAux_unitHeader);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function DataMap__AddUnitColumn_C98E589(this$, cells) {
|
|
133
|
+
this$.table.AddColumn(DataMapAux_unitHeader, cells);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function DataMap__GetDataTypeColumn(this$) {
|
|
137
|
+
return this$.table.GetColumnByHeader(DataMapAux_objectTypeHeader);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function DataMap__AddDataTypeColumn_C98E589(this$, cells) {
|
|
141
|
+
this$.table.AddColumn(DataMapAux_objectTypeHeader, cells);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function DataMap__GetDescriptionColumn(this$) {
|
|
145
|
+
return this$.table.GetColumnByHeader(DataMapAux_descriptionHeader);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function DataMap__AddDescriptionColumn_C98E589(this$, cells) {
|
|
149
|
+
this$.table.AddColumn(DataMapAux_descriptionHeader, cells);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function DataMap__GetRow_ABCEF95(this$, row, SkipValidation) {
|
|
153
|
+
return this$.table.GetRow(row, unwrap(SkipValidation));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function DataMap_getRow_ABCEF95(row, SkipValidation) {
|
|
157
|
+
return (dm) => DataMap__GetRow_ABCEF95(dm, row, unwrap(SkipValidation));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function DataMap__Copy(this$) {
|
|
161
|
+
return DataMap_$ctor_ZD0829CB(Array.from(DataMap__get_Headers(this$)), new Dictionary(DataMap__get_Values(this$), {
|
|
162
|
+
Equals: equalArrays,
|
|
163
|
+
GetHashCode: arrayHash,
|
|
164
|
+
}));
|
|
165
|
+
}
|
|
166
|
+
|
|
@@ -224,19 +224,33 @@ export class FileSystemTree extends Union {
|
|
|
224
224
|
static createEmptyFolder(name) {
|
|
225
225
|
return FileSystemTree.createFolder(name, [FileSystemTree.createGitKeepFile()]);
|
|
226
226
|
}
|
|
227
|
-
static createAssayFolder(assayName) {
|
|
227
|
+
static createAssayFolder(assayName, hasDataMap) {
|
|
228
|
+
const hasDataMap_1 = defaultArg(hasDataMap, false);
|
|
228
229
|
const dataset = FileSystemTree.createEmptyFolder("dataset");
|
|
229
230
|
const protocols = FileSystemTree.createEmptyFolder("protocols");
|
|
230
231
|
const readme = FileSystemTree.createReadmeFile();
|
|
231
232
|
const assayFile = FileSystemTree.createFile("isa.assay.xlsx");
|
|
232
|
-
|
|
233
|
+
if (hasDataMap_1) {
|
|
234
|
+
const dataMapFile = FileSystemTree.createFile("isa.datamap.xlsx");
|
|
235
|
+
return FileSystemTree.createFolder(assayName, [dataset, protocols, assayFile, readme, dataMapFile]);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
return FileSystemTree.createFolder(assayName, [dataset, protocols, assayFile, readme]);
|
|
239
|
+
}
|
|
233
240
|
}
|
|
234
|
-
static createStudyFolder(studyName) {
|
|
241
|
+
static createStudyFolder(studyName, hasDataMap) {
|
|
242
|
+
const hasDataMap_1 = defaultArg(hasDataMap, false);
|
|
235
243
|
const resources = FileSystemTree.createEmptyFolder("resources");
|
|
236
244
|
const protocols = FileSystemTree.createEmptyFolder("protocols");
|
|
237
245
|
const readme = FileSystemTree.createReadmeFile();
|
|
238
246
|
const studyFile = FileSystemTree.createFile("isa.study.xlsx");
|
|
239
|
-
|
|
247
|
+
if (hasDataMap_1) {
|
|
248
|
+
const dataMapFile = FileSystemTree.createFile("isa.datamap.xlsx");
|
|
249
|
+
return FileSystemTree.createFolder(studyName, [resources, protocols, studyFile, readme, dataMapFile]);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
return FileSystemTree.createFolder(studyName, [resources, protocols, studyFile, readme]);
|
|
253
|
+
}
|
|
240
254
|
}
|
|
241
255
|
static createInvestigationFile() {
|
|
242
256
|
return FileSystemTree.createFile("isa.investigation.xlsx");
|
package/Json/Assay.js
CHANGED
|
@@ -39,7 +39,7 @@ export function Assay_encoder(assay) {
|
|
|
39
39
|
|
|
40
40
|
export const Assay_decoder = object((get$) => {
|
|
41
41
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6;
|
|
42
|
-
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
42
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), void 0, unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
export function Assay_encoderCompressed(stringTable, oaTable, cellTable, assay) {
|
|
@@ -57,7 +57,7 @@ export function Assay_encoderCompressed(stringTable, oaTable, cellTable, assay)
|
|
|
57
57
|
export function Assay_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
58
58
|
return object((get$) => {
|
|
59
59
|
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6;
|
|
60
|
-
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
60
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), void 0, unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -94,7 +94,7 @@ export const Assay_ROCrate_decoder = object((get$) => {
|
|
|
94
94
|
const a = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(arg_4);
|
|
95
95
|
return a.Tables;
|
|
96
96
|
}, (arg_3 = list_2(Process_ROCrate_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("processSequence", arg_3))));
|
|
97
|
-
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ROCrate_decoderPropertyValue))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap(tables), unwrap((arg_12 = Decode_resizeArray(Person_ROCrate_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("performers", arg_12)))), unwrap((arg_14 = Decode_resizeArray(Comment_ROCrate_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("comments", arg_14)))));
|
|
97
|
+
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ROCrate_decoderPropertyValue))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap(tables), void 0, unwrap((arg_12 = Decode_resizeArray(Person_ROCrate_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("performers", arg_12)))), unwrap((arg_14 = Decode_resizeArray(Comment_ROCrate_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("comments", arg_14)))));
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
export function Assay_ISAJson_encoder(a) {
|
|
@@ -123,7 +123,7 @@ export const Assay_ISAJson_decoder = Decode_objectNoAdditionalProperties(Assay_I
|
|
|
123
123
|
const a = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(arg_4);
|
|
124
124
|
return a.Tables;
|
|
125
125
|
}, (arg_3 = list_2(Process_ISAJson_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("processSequence", arg_3))));
|
|
126
|
-
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ISAJson_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ISAJson_decoder))), unwrap((arg_10 = map_1(JsonTypes_decomposeTechnologyPlatform, string), (objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", arg_10)))), unwrap(tables), void 0, unwrap((arg_12 = Decode_resizeArray(Comment_ISAJson_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_12)))));
|
|
126
|
+
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ISAJson_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ISAJson_decoder))), unwrap((arg_10 = map_1(JsonTypes_decomposeTechnologyPlatform, string), (objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", arg_10)))), unwrap(tables), void 0, void 0, unwrap((arg_12 = Decode_resizeArray(Comment_ISAJson_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_12)))));
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
export function ARCtrl_ArcAssay__ArcAssay_fromJsonString_Static_Z721C83C5(s) {
|