@nfdi4plants/arctrl 1.0.0-beta.7 → 1.0.0-beta.9

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,16 +1,16 @@
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
- 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";
4
+ import { addRangeInPlace, 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";
6
6
  import { printf, toText } from "../../../fable_modules/fable-library.4.5.0/String.js";
7
- import { create, match } from "../../../fable_modules/fable-library.4.5.0/RegExp.js";
7
+ import { ActivePatterns_$007CRegex$007C_$007C } from "../Regex.js";
8
8
  import { OntologyAnnotation } from "../JsonTypes/OntologyAnnotation.js";
9
- import { Value_fromString_Z721C83C5, Value__get_Text } from "../JsonTypes/Value.js";
9
+ import { Value } from "../JsonTypes/Value.js";
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";
@@ -27,21 +27,21 @@ export class ArcAssay extends ArcTables {
27
27
  super(defaultArg(tables, []));
28
28
  const performers_1 = defaultArg(performers, []);
29
29
  const comments_1 = defaultArg(comments, []);
30
- this["identifier@87"] = identifier;
30
+ this["identifier@96"] = identifier;
31
31
  this.investigation = void 0;
32
- this["MeasurementType@"] = measurementType;
33
- this["TechnologyType@"] = technologyType;
34
- this["TechnologyPlatform@"] = technologyPlatform;
35
- this["Performers@"] = performers_1;
36
- this["Comments@"] = comments_1;
32
+ this["measurementType@98"] = measurementType;
33
+ this["technologyType@99"] = technologyType;
34
+ this["technologyPlatform@100"] = technologyPlatform;
35
+ this["performers@101-1"] = performers_1;
36
+ this["comments@102-1"] = comments_1;
37
37
  }
38
38
  get Identifier() {
39
39
  const this$ = this;
40
- return this$["identifier@87"];
40
+ return this$["identifier@96"];
41
41
  }
42
42
  set Identifier(i) {
43
43
  const this$ = this;
44
- this$["identifier@87"] = i;
44
+ this$["identifier@96"] = i;
45
45
  }
46
46
  get Investigation() {
47
47
  const this$ = this;
@@ -51,48 +51,45 @@ export class ArcAssay extends ArcTables {
51
51
  const this$ = this;
52
52
  this$.investigation = i;
53
53
  }
54
- static get FileName() {
55
- return "isa.assay.xlsx";
56
- }
57
54
  get MeasurementType() {
58
- const __ = this;
59
- return unwrap(__["MeasurementType@"]);
55
+ const this$ = this;
56
+ return unwrap(this$["measurementType@98"]);
60
57
  }
61
- set MeasurementType(v) {
62
- const __ = this;
63
- __["MeasurementType@"] = v;
58
+ set MeasurementType(n) {
59
+ const this$ = this;
60
+ this$["measurementType@98"] = n;
64
61
  }
65
62
  get TechnologyType() {
66
- const __ = this;
67
- return unwrap(__["TechnologyType@"]);
63
+ const this$ = this;
64
+ return unwrap(this$["technologyType@99"]);
68
65
  }
69
- set TechnologyType(v) {
70
- const __ = this;
71
- __["TechnologyType@"] = v;
66
+ set TechnologyType(n) {
67
+ const this$ = this;
68
+ this$["technologyType@99"] = n;
72
69
  }
73
70
  get TechnologyPlatform() {
74
- const __ = this;
75
- return unwrap(__["TechnologyPlatform@"]);
71
+ const this$ = this;
72
+ return unwrap(this$["technologyPlatform@100"]);
76
73
  }
77
- set TechnologyPlatform(v) {
78
- const __ = this;
79
- __["TechnologyPlatform@"] = v;
74
+ set TechnologyPlatform(n) {
75
+ const this$ = this;
76
+ this$["technologyPlatform@100"] = n;
80
77
  }
81
78
  get Performers() {
82
- const __ = this;
83
- return __["Performers@"];
79
+ const this$ = this;
80
+ return this$["performers@101-1"];
84
81
  }
85
- set Performers(v) {
86
- const __ = this;
87
- __["Performers@"] = v;
82
+ set Performers(n) {
83
+ const this$ = this;
84
+ this$["performers@101-1"] = n;
88
85
  }
89
86
  get Comments() {
90
- const __ = this;
91
- return __["Comments@"];
87
+ const this$ = this;
88
+ return this$["comments@102-1"];
92
89
  }
93
- set Comments(v) {
94
- const __ = this;
95
- __["Comments@"] = v;
90
+ set Comments(n) {
91
+ const this$ = this;
92
+ this$["comments@102-1"] = n;
96
93
  }
97
94
  static init(identifier) {
98
95
  return new ArcAssay(identifier);
@@ -103,6 +100,9 @@ export class ArcAssay extends ArcTables {
103
100
  static make(identifier, measurementType, technologyType, technologyPlatform, tables, performers, comments) {
104
101
  return new ArcAssay(identifier, unwrap(measurementType), unwrap(technologyType), unwrap(technologyPlatform), tables, performers, comments);
105
102
  }
103
+ static get FileName() {
104
+ return "isa.assay.xlsx";
105
+ }
106
106
  get StudiesRegisteredIn() {
107
107
  const this$ = this;
108
108
  const matchValue = this$.Investigation;
@@ -441,12 +441,16 @@ export class ArcAssay extends ArcTables {
441
441
  return (matchValue == null) ? (`${tp.NameText}`) : (`${tp.NameText} (${tp.TermAccessionShort})`);
442
442
  }
443
443
  static decomposeTechnologyPlatform(name) {
444
- const r = match(create("(?<value>[^\\(]+) \\((?<ontology>[^(]*:[^)]*)\\)"), name);
445
- if (r != null) {
444
+ const activePatternResult = ActivePatterns_$007CRegex$007C_$007C("(?<value>[^\\(]+) \\((?<ontology>[^(]*:[^)]*)\\)", name);
445
+ if (activePatternResult != null) {
446
+ const r = activePatternResult;
446
447
  let oa;
447
448
  const termAnnotation = (r.groups && r.groups.ontology) || "";
448
449
  oa = OntologyAnnotation.fromTermAnnotation(termAnnotation);
449
- return new OntologyAnnotation(oa.ID, new AnnotationValue(0, [Value__get_Text(Value_fromString_Z721C83C5((r.groups && r.groups.value) || ""))]), oa.TermSourceREF, oa.TermAccessionNumber, oa.Comments);
450
+ let v;
451
+ const value = (r.groups && r.groups.value) || "";
452
+ v = Value.fromString(value);
453
+ return new OntologyAnnotation(oa.ID, new AnnotationValue(0, [v.Text]), oa.TermSourceREF, oa.TermAccessionNumber, oa.Comments);
450
454
  }
451
455
  else {
452
456
  return OntologyAnnotation.fromString(name);
@@ -558,26 +562,26 @@ export class ArcStudy extends ArcTables {
558
562
  const registeredAssayIdentifiers_1 = defaultArg(registeredAssayIdentifiers, []);
559
563
  const factors_1 = defaultArg(factors, []);
560
564
  const comments_1 = defaultArg(comments, []);
561
- this["identifier@564"] = identifier;
565
+ this["identifier@570"] = identifier;
562
566
  this.investigation = void 0;
563
- this["Title@"] = title;
564
- this["Description@"] = description;
565
- this["SubmissionDate@"] = submissionDate;
566
- this["PublicReleaseDate@"] = publicReleaseDate;
567
- this["Publications@"] = publications_1;
568
- this["Contacts@"] = contacts_1;
569
- this["StudyDesignDescriptors@"] = studyDesignDescriptors_1;
570
- this["RegisteredAssayIdentifiers@"] = registeredAssayIdentifiers_1;
571
- this["Factors@"] = factors_1;
572
- this["Comments@"] = comments_1;
567
+ this["title@572"] = title;
568
+ this["description@573"] = description;
569
+ this["submissionDate@574"] = submissionDate;
570
+ this["publicReleaseDate@575"] = publicReleaseDate;
571
+ this["publications@576-1"] = publications_1;
572
+ this["contacts@577-1"] = contacts_1;
573
+ this["studyDesignDescriptors@578-1"] = studyDesignDescriptors_1;
574
+ this["registeredAssayIdentifiers@579-1"] = registeredAssayIdentifiers_1;
575
+ this["factors@580-1"] = factors_1;
576
+ this["comments@581-1"] = comments_1;
573
577
  }
574
578
  get Identifier() {
575
579
  const this$ = this;
576
- return this$["identifier@564"];
580
+ return this$["identifier@570"];
577
581
  }
578
582
  set Identifier(i) {
579
583
  const this$ = this;
580
- this$["identifier@564"] = i;
584
+ this$["identifier@570"] = i;
581
585
  }
582
586
  get Investigation() {
583
587
  const this$ = this;
@@ -588,84 +592,84 @@ export class ArcStudy extends ArcTables {
588
592
  this$.investigation = i;
589
593
  }
590
594
  get Title() {
591
- const __ = this;
592
- return unwrap(__["Title@"]);
595
+ const this$ = this;
596
+ return unwrap(this$["title@572"]);
593
597
  }
594
- set Title(v) {
595
- const __ = this;
596
- __["Title@"] = v;
598
+ set Title(n) {
599
+ const this$ = this;
600
+ this$["title@572"] = n;
597
601
  }
598
602
  get Description() {
599
- const __ = this;
600
- return unwrap(__["Description@"]);
603
+ const this$ = this;
604
+ return unwrap(this$["description@573"]);
601
605
  }
602
- set Description(v) {
603
- const __ = this;
604
- __["Description@"] = v;
606
+ set Description(n) {
607
+ const this$ = this;
608
+ this$["description@573"] = n;
605
609
  }
606
610
  get SubmissionDate() {
607
- const __ = this;
608
- return unwrap(__["SubmissionDate@"]);
611
+ const this$ = this;
612
+ return unwrap(this$["submissionDate@574"]);
609
613
  }
610
- set SubmissionDate(v) {
611
- const __ = this;
612
- __["SubmissionDate@"] = v;
614
+ set SubmissionDate(n) {
615
+ const this$ = this;
616
+ this$["submissionDate@574"] = n;
613
617
  }
614
618
  get PublicReleaseDate() {
615
- const __ = this;
616
- return unwrap(__["PublicReleaseDate@"]);
619
+ const this$ = this;
620
+ return unwrap(this$["publicReleaseDate@575"]);
617
621
  }
618
- set PublicReleaseDate(v) {
619
- const __ = this;
620
- __["PublicReleaseDate@"] = v;
622
+ set PublicReleaseDate(n) {
623
+ const this$ = this;
624
+ this$["publicReleaseDate@575"] = n;
621
625
  }
622
626
  get Publications() {
623
- const __ = this;
624
- return __["Publications@"];
627
+ const this$ = this;
628
+ return this$["publications@576-1"];
625
629
  }
626
- set Publications(v) {
627
- const __ = this;
628
- __["Publications@"] = v;
630
+ set Publications(n) {
631
+ const this$ = this;
632
+ this$["publications@576-1"] = n;
629
633
  }
630
634
  get Contacts() {
631
- const __ = this;
632
- return __["Contacts@"];
635
+ const this$ = this;
636
+ return this$["contacts@577-1"];
633
637
  }
634
- set Contacts(v) {
635
- const __ = this;
636
- __["Contacts@"] = v;
638
+ set Contacts(n) {
639
+ const this$ = this;
640
+ this$["contacts@577-1"] = n;
637
641
  }
638
642
  get StudyDesignDescriptors() {
639
- const __ = this;
640
- return __["StudyDesignDescriptors@"];
643
+ const this$ = this;
644
+ return this$["studyDesignDescriptors@578-1"];
641
645
  }
642
- set StudyDesignDescriptors(v) {
643
- const __ = this;
644
- __["StudyDesignDescriptors@"] = v;
646
+ set StudyDesignDescriptors(n) {
647
+ const this$ = this;
648
+ this$["studyDesignDescriptors@578-1"] = n;
645
649
  }
646
650
  get RegisteredAssayIdentifiers() {
647
- const __ = this;
648
- return __["RegisteredAssayIdentifiers@"];
651
+ const this$ = this;
652
+ return this$["registeredAssayIdentifiers@579-1"];
649
653
  }
650
- set RegisteredAssayIdentifiers(v) {
651
- const __ = this;
652
- __["RegisteredAssayIdentifiers@"] = v;
654
+ set RegisteredAssayIdentifiers(n) {
655
+ const this$ = this;
656
+ this$["registeredAssayIdentifiers@579-1"] = n;
653
657
  }
654
658
  get Factors() {
655
- const __ = this;
656
- return __["Factors@"];
659
+ const this$ = this;
660
+ return this$["factors@580-1"];
657
661
  }
658
- set Factors(v) {
659
- const __ = this;
660
- __["Factors@"] = v;
662
+ set Factors(n) {
663
+ const this$ = this;
664
+ this$["factors@580-1"] = n;
661
665
  }
662
666
  get Comments() {
663
- const __ = this;
664
- return __["Comments@"];
667
+ const this$ = this;
668
+ return this$["comments@581-1"];
665
669
  }
666
- set Comments(v) {
667
- const __ = this;
668
- __["Comments@"] = v;
670
+ set Comments(n) {
671
+ const this$ = this;
672
+ this$["comments@581-1"] = n;
669
673
  }
670
674
  static init(identifier) {
671
675
  return new ArcStudy(identifier);
@@ -683,10 +687,14 @@ export class ArcStudy extends ArcTables {
683
687
  static get FileName() {
684
688
  return "isa.study.xlsx";
685
689
  }
686
- get RegisteredAssayCount() {
690
+ get RegisteredAssayIdentifierCount() {
687
691
  const this$ = this;
688
692
  return this$.RegisteredAssayIdentifiers.length | 0;
689
693
  }
694
+ get RegisteredAssayCount() {
695
+ const this$ = this;
696
+ return this$.RegisteredAssays.length | 0;
697
+ }
690
698
  get RegisteredAssays() {
691
699
  const this$ = this;
692
700
  let inv;
@@ -700,6 +708,19 @@ export class ArcStudy extends ArcTables {
700
708
  const collection = choose((assayIdentifier) => inv.TryGetAssay(assayIdentifier), this$.RegisteredAssayIdentifiers);
701
709
  return Array.from(collection);
702
710
  }
711
+ get VacantAssayIdentifiers() {
712
+ const this$ = this;
713
+ let inv;
714
+ const investigation = this$.Investigation;
715
+ if (investigation != null) {
716
+ inv = investigation;
717
+ }
718
+ else {
719
+ throw new Error("Cannot execute this function. Object is not part of ArcInvestigation.");
720
+ }
721
+ const collection = filter((arg) => !inv.ContainsAssay(arg), this$.RegisteredAssayIdentifiers);
722
+ return Array.from(collection);
723
+ }
703
724
  AddRegisteredAssay(assay) {
704
725
  const this$ = this;
705
726
  let inv;
@@ -1249,124 +1270,124 @@ export class ArcInvestigation {
1249
1270
  const registeredStudyIdentifiers_1 = defaultArg(registeredStudyIdentifiers, []);
1250
1271
  const comments_1 = defaultArg(comments, []);
1251
1272
  const remarks_1 = defaultArg(remarks, []);
1252
- this["identifier@1148"] = identifier;
1253
- this["Title@"] = title;
1254
- this["Description@"] = description;
1255
- this["SubmissionDate@"] = submissionDate;
1256
- this["PublicReleaseDate@"] = publicReleaseDate;
1257
- this["OntologySourceReferences@"] = ontologySourceReferences_1;
1258
- this["Publications@"] = publications_1;
1259
- this["Contacts@"] = contacts_1;
1260
- this["Assays@"] = assays_1;
1261
- this["Studies@"] = studies_1;
1262
- this["RegisteredStudyIdentifiers@"] = registeredStudyIdentifiers_1;
1263
- this["Comments@"] = comments_1;
1264
- this["Remarks@"] = remarks_1;
1265
- this["init@1129"] = 1;
1273
+ this["identifier@1173"] = identifier;
1274
+ this["title@1174"] = title;
1275
+ this["description@1175"] = description;
1276
+ this["submissionDate@1176"] = submissionDate;
1277
+ this["publicReleaseDate@1177"] = publicReleaseDate;
1278
+ this["ontologySourceReferences@1178-1"] = ontologySourceReferences_1;
1279
+ this["publications@1179-1"] = publications_1;
1280
+ this["contacts@1180-1"] = contacts_1;
1281
+ this["assays@1181-1"] = assays_1;
1282
+ this["studies@1182-1"] = studies_1;
1283
+ this["registeredStudyIdentifiers@1183-1"] = registeredStudyIdentifiers_1;
1284
+ this["comments@1184-1"] = comments_1;
1285
+ this["remarks@1185-1"] = remarks_1;
1286
+ this["init@1154"] = 1;
1266
1287
  }
1267
1288
  get Identifier() {
1268
1289
  const this$ = this;
1269
- return this$["identifier@1148"];
1290
+ return this$["identifier@1173"];
1270
1291
  }
1271
1292
  set Identifier(i) {
1272
1293
  const this$ = this;
1273
- this$["identifier@1148"] = i;
1294
+ this$["identifier@1173"] = i;
1274
1295
  }
1275
1296
  get Title() {
1276
- const __ = this;
1277
- return unwrap(__["Title@"]);
1297
+ const this$ = this;
1298
+ return unwrap(this$["title@1174"]);
1278
1299
  }
1279
- set Title(v) {
1280
- const __ = this;
1281
- __["Title@"] = v;
1300
+ set Title(n) {
1301
+ const this$ = this;
1302
+ this$["title@1174"] = n;
1282
1303
  }
1283
1304
  get Description() {
1284
- const __ = this;
1285
- return unwrap(__["Description@"]);
1305
+ const this$ = this;
1306
+ return unwrap(this$["description@1175"]);
1286
1307
  }
1287
- set Description(v) {
1288
- const __ = this;
1289
- __["Description@"] = v;
1308
+ set Description(n) {
1309
+ const this$ = this;
1310
+ this$["description@1175"] = n;
1290
1311
  }
1291
1312
  get SubmissionDate() {
1292
- const __ = this;
1293
- return unwrap(__["SubmissionDate@"]);
1313
+ const this$ = this;
1314
+ return unwrap(this$["submissionDate@1176"]);
1294
1315
  }
1295
- set SubmissionDate(v) {
1296
- const __ = this;
1297
- __["SubmissionDate@"] = v;
1316
+ set SubmissionDate(n) {
1317
+ const this$ = this;
1318
+ this$["submissionDate@1176"] = n;
1298
1319
  }
1299
1320
  get PublicReleaseDate() {
1300
- const __ = this;
1301
- return unwrap(__["PublicReleaseDate@"]);
1321
+ const this$ = this;
1322
+ return unwrap(this$["publicReleaseDate@1177"]);
1302
1323
  }
1303
- set PublicReleaseDate(v) {
1304
- const __ = this;
1305
- __["PublicReleaseDate@"] = v;
1324
+ set PublicReleaseDate(n) {
1325
+ const this$ = this;
1326
+ this$["publicReleaseDate@1177"] = n;
1306
1327
  }
1307
1328
  get OntologySourceReferences() {
1308
- const __ = this;
1309
- return __["OntologySourceReferences@"];
1329
+ const this$ = this;
1330
+ return this$["ontologySourceReferences@1178-1"];
1310
1331
  }
1311
- set OntologySourceReferences(v) {
1312
- const __ = this;
1313
- __["OntologySourceReferences@"] = v;
1332
+ set OntologySourceReferences(n) {
1333
+ const this$ = this;
1334
+ this$["ontologySourceReferences@1178-1"] = n;
1314
1335
  }
1315
1336
  get Publications() {
1316
- const __ = this;
1317
- return __["Publications@"];
1337
+ const this$ = this;
1338
+ return this$["publications@1179-1"];
1318
1339
  }
1319
- set Publications(v) {
1320
- const __ = this;
1321
- __["Publications@"] = v;
1340
+ set Publications(n) {
1341
+ const this$ = this;
1342
+ this$["publications@1179-1"] = n;
1322
1343
  }
1323
1344
  get Contacts() {
1324
- const __ = this;
1325
- return __["Contacts@"];
1345
+ const this$ = this;
1346
+ return this$["contacts@1180-1"];
1326
1347
  }
1327
- set Contacts(v) {
1328
- const __ = this;
1329
- __["Contacts@"] = v;
1348
+ set Contacts(n) {
1349
+ const this$ = this;
1350
+ this$["contacts@1180-1"] = n;
1330
1351
  }
1331
1352
  get Assays() {
1332
- const __ = this;
1333
- return __["Assays@"];
1353
+ const this$ = this;
1354
+ return this$["assays@1181-1"];
1334
1355
  }
1335
- set Assays(v) {
1336
- const __ = this;
1337
- __["Assays@"] = v;
1356
+ set Assays(n) {
1357
+ const this$ = this;
1358
+ this$["assays@1181-1"] = n;
1338
1359
  }
1339
1360
  get Studies() {
1340
- const __ = this;
1341
- return __["Studies@"];
1361
+ const this$ = this;
1362
+ return this$["studies@1182-1"];
1342
1363
  }
1343
- set Studies(v) {
1344
- const __ = this;
1345
- __["Studies@"] = v;
1364
+ set Studies(n) {
1365
+ const this$ = this;
1366
+ this$["studies@1182-1"] = n;
1346
1367
  }
1347
1368
  get RegisteredStudyIdentifiers() {
1348
- const __ = this;
1349
- return __["RegisteredStudyIdentifiers@"];
1369
+ const this$ = this;
1370
+ return this$["registeredStudyIdentifiers@1183-1"];
1350
1371
  }
1351
- set RegisteredStudyIdentifiers(v) {
1352
- const __ = this;
1353
- __["RegisteredStudyIdentifiers@"] = v;
1372
+ set RegisteredStudyIdentifiers(n) {
1373
+ const this$ = this;
1374
+ this$["registeredStudyIdentifiers@1183-1"] = n;
1354
1375
  }
1355
1376
  get Comments() {
1356
- const __ = this;
1357
- return __["Comments@"];
1377
+ const this$ = this;
1378
+ return this$["comments@1184-1"];
1358
1379
  }
1359
- set Comments(v) {
1360
- const __ = this;
1361
- __["Comments@"] = v;
1380
+ set Comments(n) {
1381
+ const this$ = this;
1382
+ this$["comments@1184-1"] = n;
1362
1383
  }
1363
1384
  get Remarks() {
1364
- const __ = this;
1365
- return __["Remarks@"];
1385
+ const this$ = this;
1386
+ return this$["remarks@1185-1"];
1366
1387
  }
1367
- set Remarks(v) {
1368
- const __ = this;
1369
- __["Remarks@"] = v;
1388
+ set Remarks(n) {
1389
+ const this$ = this;
1390
+ this$["remarks@1185-1"] = n;
1370
1391
  }
1371
1392
  static get FileName() {
1372
1393
  return "isa.investigation.xlsx";
@@ -1388,6 +1409,10 @@ export class ArcInvestigation {
1388
1409
  const this$ = this;
1389
1410
  return Array.from(map_2((x) => x.Identifier, this$.Assays));
1390
1411
  }
1412
+ get UnregisteredAssays() {
1413
+ const this$ = this;
1414
+ return ResizeArray_filter((a) => !exists((s) => exists((i) => (i === a.Identifier), s.RegisteredAssayIdentifiers), this$.RegisteredStudies), this$.Assays);
1415
+ }
1391
1416
  AddAssay(assay) {
1392
1417
  const this$ = this;
1393
1418
  const assayIdent = assay.Identifier;
@@ -1531,8 +1556,13 @@ export class ArcInvestigation {
1531
1556
  }
1532
1557
  GetAssay(assayIdentifier) {
1533
1558
  const this$ = this;
1534
- const index = this$.GetAssayIndex(assayIdentifier) | 0;
1535
- return this$.GetAssayAt(index);
1559
+ const matchValue = this$.TryGetAssay(assayIdentifier);
1560
+ if (matchValue == null) {
1561
+ throw new Error(ArcTypesAux_ErrorMsgs_unableToFindAssayIdentifier(assayIdentifier, this$.Identifier));
1562
+ }
1563
+ else {
1564
+ return matchValue;
1565
+ }
1536
1566
  }
1537
1567
  static getAssay(assayIdentifier) {
1538
1568
  return (inv) => {
@@ -1550,10 +1580,28 @@ export class ArcInvestigation {
1550
1580
  return newInvestigation.TryGetAssay(assayIdentifier);
1551
1581
  };
1552
1582
  }
1583
+ ContainsAssay(assayIdentifier) {
1584
+ const this$ = this;
1585
+ return exists((a) => (a.Identifier === assayIdentifier), this$.Assays);
1586
+ }
1587
+ static containsAssay(assayIdentifier) {
1588
+ return (inv) => inv.ContainsAssay(assayIdentifier);
1589
+ }
1590
+ get RegisteredStudyIdentifierCount() {
1591
+ const this$ = this;
1592
+ return this$.RegisteredStudyIdentifiers.length | 0;
1593
+ }
1553
1594
  get RegisteredStudies() {
1554
1595
  const this$ = this;
1555
- const collection = choose((identifier) => this$.TryGetStudy(identifier), this$.RegisteredStudyIdentifiers);
1556
- return Array.from(collection);
1596
+ return ResizeArray_choose((identifier) => this$.TryGetStudy(identifier), this$.RegisteredStudyIdentifiers);
1597
+ }
1598
+ get RegisteredStudyCount() {
1599
+ const this$ = this;
1600
+ return this$.RegisteredStudies.length | 0;
1601
+ }
1602
+ get VacantStudyIdentifiers() {
1603
+ const this$ = this;
1604
+ return ResizeArray_filter((arg) => !this$.ContainsStudy(arg), this$.RegisteredStudyIdentifiers);
1557
1605
  }
1558
1606
  get StudyCount() {
1559
1607
  const this$ = this;
@@ -1563,6 +1611,13 @@ export class ArcInvestigation {
1563
1611
  const this$ = this;
1564
1612
  return toArray(map_2((x) => x.Identifier, this$.Studies));
1565
1613
  }
1614
+ get UnregisteredStudies() {
1615
+ const this$ = this;
1616
+ return ResizeArray_filter((s) => {
1617
+ let source, x;
1618
+ return !((source = this$.RegisteredStudyIdentifiers, exists((x = s.Identifier, (y) => (x === y)), source)));
1619
+ }, this$.Studies);
1620
+ }
1566
1621
  AddStudy(study) {
1567
1622
  const this$ = this;
1568
1623
  const study_1 = study;
@@ -1734,7 +1789,13 @@ export class ArcInvestigation {
1734
1789
  }
1735
1790
  GetStudy(studyIdentifier) {
1736
1791
  const this$ = this;
1737
- return defaultArg(tryFind_1((s) => (s.Identifier === studyIdentifier), this$.Studies), defaultOf());
1792
+ const matchValue = this$.TryGetStudy(studyIdentifier);
1793
+ if (matchValue == null) {
1794
+ throw new Error(ArcTypesAux_ErrorMsgs_unableToFindStudyIdentifier(studyIdentifier, this$.Identifier));
1795
+ }
1796
+ else {
1797
+ return matchValue;
1798
+ }
1738
1799
  }
1739
1800
  static getStudy(studyIdentifier) {
1740
1801
  return (inv) => {
@@ -1752,6 +1813,13 @@ export class ArcInvestigation {
1752
1813
  return newInv.TryGetStudy(studyIdentifier);
1753
1814
  };
1754
1815
  }
1816
+ ContainsStudy(studyIdentifier) {
1817
+ const this$ = this;
1818
+ return exists((s) => (s.Identifier === studyIdentifier), this$.Studies);
1819
+ }
1820
+ static containsStudy(studyIdentifier) {
1821
+ return (inv) => inv.ContainsStudy(studyIdentifier);
1822
+ }
1755
1823
  RegisterAssayAt(studyIndex, assayIdentifier) {
1756
1824
  const this$ = this;
1757
1825
  const study = this$.GetStudyAt(studyIndex);
@@ -1883,7 +1951,8 @@ export class ArcInvestigation {
1883
1951
  try {
1884
1952
  while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
1885
1953
  const study = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
1886
- let enumerator_1 = getEnumerator(Array.from(study.RegisteredAssayIdentifiers));
1954
+ const rai = study.RegisteredAssayIdentifiers;
1955
+ let enumerator_1 = getEnumerator(Array.from(rai));
1887
1956
  try {
1888
1957
  while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
1889
1958
  const registeredAssay = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
@@ -2077,3 +2146,11 @@ export function ArcInvestigation_$ctor_21AB11E9(identifier, title, description,
2077
2146
  return new ArcInvestigation(identifier, title, description, submissionDate, publicReleaseDate, ontologySourceReferences, publications, contacts, assays, studies, registeredStudyIdentifiers, comments, remarks);
2078
2147
  }
2079
2148
 
2149
+ export function ArcTypesAux_ErrorMsgs_unableToFindAssayIdentifier(assayIdentifier, investigationIdentifier) {
2150
+ return `Error. Unable to find assay with identifier '${assayIdentifier}' in investigation ${investigationIdentifier}.`;
2151
+ }
2152
+
2153
+ export function ArcTypesAux_ErrorMsgs_unableToFindStudyIdentifier(studyIdentifer, investigationIdentifier) {
2154
+ return `Error. Unable to find study with identifier '${studyIdentifer}' in investigation ${investigationIdentifier}.`;
2155
+ }
2156
+