@nfdi4plants/arctrl 1.0.0-beta.7 → 1.0.0-beta.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { map as map_1, defaultArg, unwrap } from "../../../fable_modules/fable-library.4.5.0/Option.js";
|
|
2
|
-
import { concat, collect, append as append_4, tryFind, removeAt, tryFindIndex, choose, item, map as map_2, delay, toList, fold, length, forAll, contains, filter, toArray } from "../../../fable_modules/fable-library.4.5.0/Seq.js";
|
|
2
|
+
import { concat, collect, append as append_4, tryFind, removeAt, tryFindIndex, exists, choose, item, map as map_2, delay, toList, fold, length, forAll, contains, filter, toArray } from "../../../fable_modules/fable-library.4.5.0/Seq.js";
|
|
3
3
|
import { defaultOf, safeHash, equals, disposeSafe, getEnumerator, stringHash } from "../../../fable_modules/fable-library.4.5.0/Util.js";
|
|
4
4
|
import { addRangeInPlace, tryFind as tryFind_1, removeInPlace, equalsWith, append as append_3, contains as contains_1, map } from "../../../fable_modules/fable-library.4.5.0/Array.js";
|
|
5
5
|
import { distinctBy, Array_distinct } from "../../../fable_modules/fable-library.4.5.0/Seq2.js";
|
|
@@ -10,7 +10,7 @@ import { Value_fromString_Z721C83C5, Value__get_Text } from "../JsonTypes/Value.
|
|
|
10
10
|
import { AnnotationValue } from "../JsonTypes/AnnotationValue.js";
|
|
11
11
|
import { ArcTablesAux_applyIOMap, ArcTablesAux_getIOMap, ArcTables_$reflection, ArcTables } from "./ArcTables.js";
|
|
12
12
|
import { AssayMaterials_get_empty, AssayMaterials_create_Z253F0553 } from "../JsonTypes/AssayMaterials.js";
|
|
13
|
-
import { ResizeArray_map, HashCodes_boxHashOption, HashCodes_boxHashArray, Option_fromValueWithDefault } from "../Helper.js";
|
|
13
|
+
import { ResizeArray_choose, ResizeArray_filter, ResizeArray_map, HashCodes_boxHashOption, HashCodes_boxHashArray, Option_fromValueWithDefault } from "../Helper.js";
|
|
14
14
|
import { unzip, ofSeq, map as map_3, toArray as toArray_1, ofArray, empty } from "../../../fable_modules/fable-library.4.5.0/List.js";
|
|
15
15
|
import { getSources, getProtocols, getUnits, getCharacteristics, getData, getMaterials, getSamples } from "../JsonTypes/ProcessSequence.js";
|
|
16
16
|
import { Assay_create_3D372A24 } from "../JsonTypes/Assay.js";
|
|
@@ -683,10 +683,14 @@ export class ArcStudy extends ArcTables {
|
|
|
683
683
|
static get FileName() {
|
|
684
684
|
return "isa.study.xlsx";
|
|
685
685
|
}
|
|
686
|
-
get
|
|
686
|
+
get RegisteredAssayIdentifierCount() {
|
|
687
687
|
const this$ = this;
|
|
688
688
|
return this$.RegisteredAssayIdentifiers.length | 0;
|
|
689
689
|
}
|
|
690
|
+
get RegisteredAssayCount() {
|
|
691
|
+
const this$ = this;
|
|
692
|
+
return this$.RegisteredAssays.length | 0;
|
|
693
|
+
}
|
|
690
694
|
get RegisteredAssays() {
|
|
691
695
|
const this$ = this;
|
|
692
696
|
let inv;
|
|
@@ -700,6 +704,19 @@ export class ArcStudy extends ArcTables {
|
|
|
700
704
|
const collection = choose((assayIdentifier) => inv.TryGetAssay(assayIdentifier), this$.RegisteredAssayIdentifiers);
|
|
701
705
|
return Array.from(collection);
|
|
702
706
|
}
|
|
707
|
+
get VacantAssayIdentifiers() {
|
|
708
|
+
const this$ = this;
|
|
709
|
+
let inv;
|
|
710
|
+
const investigation = this$.Investigation;
|
|
711
|
+
if (investigation != null) {
|
|
712
|
+
inv = investigation;
|
|
713
|
+
}
|
|
714
|
+
else {
|
|
715
|
+
throw new Error("Cannot execute this function. Object is not part of ArcInvestigation.");
|
|
716
|
+
}
|
|
717
|
+
const collection = filter((arg) => !inv.ContainsAssay(arg), this$.RegisteredAssayIdentifiers);
|
|
718
|
+
return Array.from(collection);
|
|
719
|
+
}
|
|
703
720
|
AddRegisteredAssay(assay) {
|
|
704
721
|
const this$ = this;
|
|
705
722
|
let inv;
|
|
@@ -1249,7 +1266,7 @@ export class ArcInvestigation {
|
|
|
1249
1266
|
const registeredStudyIdentifiers_1 = defaultArg(registeredStudyIdentifiers, []);
|
|
1250
1267
|
const comments_1 = defaultArg(comments, []);
|
|
1251
1268
|
const remarks_1 = defaultArg(remarks, []);
|
|
1252
|
-
this["identifier@
|
|
1269
|
+
this["identifier@1162"] = identifier;
|
|
1253
1270
|
this["Title@"] = title;
|
|
1254
1271
|
this["Description@"] = description;
|
|
1255
1272
|
this["SubmissionDate@"] = submissionDate;
|
|
@@ -1262,15 +1279,15 @@ export class ArcInvestigation {
|
|
|
1262
1279
|
this["RegisteredStudyIdentifiers@"] = registeredStudyIdentifiers_1;
|
|
1263
1280
|
this["Comments@"] = comments_1;
|
|
1264
1281
|
this["Remarks@"] = remarks_1;
|
|
1265
|
-
this["init@
|
|
1282
|
+
this["init@1143"] = 1;
|
|
1266
1283
|
}
|
|
1267
1284
|
get Identifier() {
|
|
1268
1285
|
const this$ = this;
|
|
1269
|
-
return this$["identifier@
|
|
1286
|
+
return this$["identifier@1162"];
|
|
1270
1287
|
}
|
|
1271
1288
|
set Identifier(i) {
|
|
1272
1289
|
const this$ = this;
|
|
1273
|
-
this$["identifier@
|
|
1290
|
+
this$["identifier@1162"] = i;
|
|
1274
1291
|
}
|
|
1275
1292
|
get Title() {
|
|
1276
1293
|
const __ = this;
|
|
@@ -1388,6 +1405,10 @@ export class ArcInvestigation {
|
|
|
1388
1405
|
const this$ = this;
|
|
1389
1406
|
return Array.from(map_2((x) => x.Identifier, this$.Assays));
|
|
1390
1407
|
}
|
|
1408
|
+
get UnregisteredAssays() {
|
|
1409
|
+
const this$ = this;
|
|
1410
|
+
return ResizeArray_filter((a) => !exists((s) => exists((i) => (i === a.Identifier), s.RegisteredAssayIdentifiers), this$.RegisteredStudies), this$.Assays);
|
|
1411
|
+
}
|
|
1391
1412
|
AddAssay(assay) {
|
|
1392
1413
|
const this$ = this;
|
|
1393
1414
|
const assayIdent = assay.Identifier;
|
|
@@ -1550,10 +1571,28 @@ export class ArcInvestigation {
|
|
|
1550
1571
|
return newInvestigation.TryGetAssay(assayIdentifier);
|
|
1551
1572
|
};
|
|
1552
1573
|
}
|
|
1574
|
+
ContainsAssay(assayIdentifier) {
|
|
1575
|
+
const this$ = this;
|
|
1576
|
+
return exists((a) => (a.Identifier === assayIdentifier), this$.Assays);
|
|
1577
|
+
}
|
|
1578
|
+
static containsAssay(assayIdentifier) {
|
|
1579
|
+
return (inv) => inv.ContainsAssay(assayIdentifier);
|
|
1580
|
+
}
|
|
1581
|
+
get RegisteredStudyIdentifierCount() {
|
|
1582
|
+
const this$ = this;
|
|
1583
|
+
return this$.RegisteredStudyIdentifiers.length | 0;
|
|
1584
|
+
}
|
|
1553
1585
|
get RegisteredStudies() {
|
|
1554
1586
|
const this$ = this;
|
|
1555
|
-
|
|
1556
|
-
|
|
1587
|
+
return ResizeArray_choose((identifier) => this$.TryGetStudy(identifier), this$.RegisteredStudyIdentifiers);
|
|
1588
|
+
}
|
|
1589
|
+
get RegisteredStudyCount() {
|
|
1590
|
+
const this$ = this;
|
|
1591
|
+
return this$.RegisteredStudies.length | 0;
|
|
1592
|
+
}
|
|
1593
|
+
get VacantStudyIdentifiers() {
|
|
1594
|
+
const this$ = this;
|
|
1595
|
+
return ResizeArray_filter((arg) => !this$.ContainsStudy(arg), this$.RegisteredStudyIdentifiers);
|
|
1557
1596
|
}
|
|
1558
1597
|
get StudyCount() {
|
|
1559
1598
|
const this$ = this;
|
|
@@ -1563,6 +1602,13 @@ export class ArcInvestigation {
|
|
|
1563
1602
|
const this$ = this;
|
|
1564
1603
|
return toArray(map_2((x) => x.Identifier, this$.Studies));
|
|
1565
1604
|
}
|
|
1605
|
+
get UnregisteredStudies() {
|
|
1606
|
+
const this$ = this;
|
|
1607
|
+
return ResizeArray_filter((s) => {
|
|
1608
|
+
let source, x;
|
|
1609
|
+
return !((source = this$.RegisteredStudyIdentifiers, exists((x = s.Identifier, (y) => (x === y)), source)));
|
|
1610
|
+
}, this$.Studies);
|
|
1611
|
+
}
|
|
1566
1612
|
AddStudy(study) {
|
|
1567
1613
|
const this$ = this;
|
|
1568
1614
|
const study_1 = study;
|
|
@@ -1752,6 +1798,13 @@ export class ArcInvestigation {
|
|
|
1752
1798
|
return newInv.TryGetStudy(studyIdentifier);
|
|
1753
1799
|
};
|
|
1754
1800
|
}
|
|
1801
|
+
ContainsStudy(studyIdentifier) {
|
|
1802
|
+
const this$ = this;
|
|
1803
|
+
return exists((s) => (s.Identifier === studyIdentifier), this$.Studies);
|
|
1804
|
+
}
|
|
1805
|
+
static containsStudy(studyIdentifier) {
|
|
1806
|
+
return (inv) => inv.ContainsStudy(studyIdentifier);
|
|
1807
|
+
}
|
|
1755
1808
|
RegisterAssayAt(studyIndex, assayIdentifier) {
|
|
1756
1809
|
const this$ = this;
|
|
1757
1810
|
const study = this$.GetStudyAt(studyIndex);
|
|
@@ -176,6 +176,15 @@ export class CompositeCell extends Union {
|
|
|
176
176
|
const this$ = this;
|
|
177
177
|
return (this$.tag === 1) ? this$.fields[0] : ((this$.tag === 2) ? (`${this$.fields[0]} ${this$.fields[1].NameText}`) : (`${this$.fields[0].NameText}`));
|
|
178
178
|
}
|
|
179
|
+
static term(oa) {
|
|
180
|
+
return new CompositeCell(0, [oa]);
|
|
181
|
+
}
|
|
182
|
+
static freeText(s) {
|
|
183
|
+
return new CompositeCell(1, [s]);
|
|
184
|
+
}
|
|
185
|
+
static unitized(v, oa) {
|
|
186
|
+
return new CompositeCell(2, [v, oa]);
|
|
187
|
+
}
|
|
179
188
|
}
|
|
180
189
|
|
|
181
190
|
export function CompositeCell_$reflection() {
|
|
@@ -215,6 +215,27 @@ export class IOType extends Union {
|
|
|
215
215
|
throw new Error(`Unable to parse combination to existing IOType: \`${iotype}\``);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
+
static source() {
|
|
219
|
+
return new IOType(0, []);
|
|
220
|
+
}
|
|
221
|
+
static sample() {
|
|
222
|
+
return new IOType(1, []);
|
|
223
|
+
}
|
|
224
|
+
static rawDataFile() {
|
|
225
|
+
return new IOType(2, []);
|
|
226
|
+
}
|
|
227
|
+
static derivedDataFile() {
|
|
228
|
+
return new IOType(3, []);
|
|
229
|
+
}
|
|
230
|
+
static imageFile() {
|
|
231
|
+
return new IOType(4, []);
|
|
232
|
+
}
|
|
233
|
+
static material() {
|
|
234
|
+
return new IOType(5, []);
|
|
235
|
+
}
|
|
236
|
+
static freeText(s) {
|
|
237
|
+
return new IOType(6, [s]);
|
|
238
|
+
}
|
|
218
239
|
}
|
|
219
240
|
|
|
220
241
|
export function IOType_$reflection() {
|
|
@@ -684,6 +705,48 @@ export class CompositeHeader extends Union {
|
|
|
684
705
|
throw new Error(`Unable to parse combination to existing CompositeHeader: \`${header}\``);
|
|
685
706
|
}
|
|
686
707
|
}
|
|
708
|
+
static component(oa) {
|
|
709
|
+
return new CompositeHeader(0, [oa]);
|
|
710
|
+
}
|
|
711
|
+
static characteristic(oa) {
|
|
712
|
+
return new CompositeHeader(1, [oa]);
|
|
713
|
+
}
|
|
714
|
+
static factor(oa) {
|
|
715
|
+
return new CompositeHeader(2, [oa]);
|
|
716
|
+
}
|
|
717
|
+
static parameter(oa) {
|
|
718
|
+
return new CompositeHeader(3, [oa]);
|
|
719
|
+
}
|
|
720
|
+
static protocolType() {
|
|
721
|
+
return new CompositeHeader(4, []);
|
|
722
|
+
}
|
|
723
|
+
static protocolDescription() {
|
|
724
|
+
return new CompositeHeader(5, []);
|
|
725
|
+
}
|
|
726
|
+
static protocolUri() {
|
|
727
|
+
return new CompositeHeader(6, []);
|
|
728
|
+
}
|
|
729
|
+
static protocolVersion() {
|
|
730
|
+
return new CompositeHeader(7, []);
|
|
731
|
+
}
|
|
732
|
+
static protocolREF() {
|
|
733
|
+
return new CompositeHeader(8, []);
|
|
734
|
+
}
|
|
735
|
+
static performer() {
|
|
736
|
+
return new CompositeHeader(9, []);
|
|
737
|
+
}
|
|
738
|
+
static date() {
|
|
739
|
+
return new CompositeHeader(10, []);
|
|
740
|
+
}
|
|
741
|
+
static input(io) {
|
|
742
|
+
return new CompositeHeader(11, [io]);
|
|
743
|
+
}
|
|
744
|
+
static output(io) {
|
|
745
|
+
return new CompositeHeader(12, [io]);
|
|
746
|
+
}
|
|
747
|
+
static freeText(s) {
|
|
748
|
+
return new CompositeHeader(13, [s]);
|
|
749
|
+
}
|
|
687
750
|
}
|
|
688
751
|
|
|
689
752
|
export function CompositeHeader_$reflection() {
|
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@ and __JavaScript__! ❤️
|
|
|
5
5
|
|
|
6
6
|
| Version | Downloads |
|
|
7
7
|
| :--------|-----------:|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/vpre/ARCtrl?logo=nuget&color=%234fb3d9"></a>|<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/ARCtrl?color=%234FB3D9"></a>|
|
|
9
|
+
|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/v/%40nfdi4plants/arctrl/next?logo=npm&color=%234fb3d9"></a>|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/dt/%40nfdi4plants%2Farctrl?color=%234fb3d9"></a>|
|
|
10
|
+
|
|
10
11
|
|
|
11
12
|
## Install
|
|
12
13
|
|