@nfdi4plants/arctrl 2.3.1 → 2.5.0

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.
Files changed (90) hide show
  1. package/ARC.js +103 -12
  2. package/CWL/CWLTypes.js +2 -2
  3. package/CWL/Decode.js +2 -2
  4. package/CWL/Inputs.js +2 -2
  5. package/CWL/Outputs.js +2 -2
  6. package/CWL/Requirements.js +2 -2
  7. package/CWL/ToolDescription.js +1 -1
  8. package/CWL/WorkflowDescription.js +1 -1
  9. package/CWL/WorkflowSteps.js +1 -1
  10. package/ColumnIndex.js +258 -0
  11. package/Conversion.js +1679 -0
  12. package/Core/Data.js +28 -3
  13. package/Core/DataFile.js +19 -3
  14. package/Core/Helper/Collections.js +107 -4
  15. package/Core/Helper/DateTime.js +17 -0
  16. package/Core/Helper/ORCID.js +39 -0
  17. package/Core/Table/ArcTable.js +6 -0
  18. package/Core/Table/CompositeHeader.js +4 -0
  19. package/Json/Assay.js +1 -1
  20. package/Json/Decode.js +3 -3
  21. package/Json/Encode.js +9 -0
  22. package/Json/Investigation.js +5 -4
  23. package/Json/OntologySourceReference.js +4 -4
  24. package/Json/ROCrate/LDContext.js +121 -0
  25. package/Json/ROCrate/LDGraph.js +87 -0
  26. package/Json/{LDObject.js → ROCrate/LDNode.js} +55 -46
  27. package/Json/ROCrate/LDRef.js +25 -0
  28. package/Json/ROCrate/LDValue.js +66 -0
  29. package/Json/Study.js +5 -4
  30. package/Json/context/rocrate/isa_investigation_context.js +2 -2
  31. package/Json/context/rocrate/isa_study_context.js +15 -11
  32. package/Json/context/rocrate/rocrate_context.js +1 -1
  33. package/JsonIO/LDObject.js +30 -5
  34. package/README.md +12 -3
  35. package/ROCrate/ArcROCrateMetadata.js +14 -13
  36. package/ROCrate/Generic/Comment.js +115 -0
  37. package/ROCrate/Generic/Dataset.js +669 -0
  38. package/ROCrate/Generic/DefinedTerm.js +115 -0
  39. package/ROCrate/Generic/File.js +200 -0
  40. package/ROCrate/Generic/LabProcess.js +238 -0
  41. package/ROCrate/Generic/LabProtocol.js +275 -0
  42. package/ROCrate/Generic/Organization.js +71 -0
  43. package/ROCrate/Generic/Person.js +411 -0
  44. package/ROCrate/Generic/PostalAddress.js +159 -0
  45. package/ROCrate/Generic/PropertyValue.js +548 -0
  46. package/ROCrate/Generic/Sample.js +139 -0
  47. package/ROCrate/Generic/ScholarlyArticle.js +187 -0
  48. package/ROCrate/Helper.js +6 -0
  49. package/ROCrate/ISAProfile/Assay.js +3 -3
  50. package/ROCrate/ISAProfile/Data.js +7 -7
  51. package/ROCrate/ISAProfile/Dataset.js +7 -6
  52. package/ROCrate/ISAProfile/Investigation.js +3 -3
  53. package/ROCrate/ISAProfile/LabProcess.js +7 -7
  54. package/ROCrate/ISAProfile/LabProtocol.js +7 -7
  55. package/ROCrate/ISAProfile/Person.js +7 -7
  56. package/ROCrate/ISAProfile/PropertyValue.js +7 -7
  57. package/ROCrate/ISAProfile/Sample.js +7 -7
  58. package/ROCrate/ISAProfile/ScholarlyArticle.js +7 -7
  59. package/ROCrate/ISAProfile/Study.js +3 -3
  60. package/ROCrate/LDContext.js +283 -0
  61. package/ROCrate/LDObject.js +902 -36
  62. package/ROCrate/ROCrateContext.js +44 -0
  63. package/ROCrateIO.js +62 -0
  64. package/Spreadsheet/DataMap.js +11 -3
  65. package/Spreadsheet/DataMapTable/DataMapHeader.js +3 -2
  66. package/Xlsx.js +21 -8
  67. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs +31 -1
  68. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynObj.fs.js +30 -1
  69. package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs +1025 -0
  70. package/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +433 -0
  71. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs +16 -0
  72. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FablePy.fs +14 -0
  73. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs +15 -0
  74. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/HashCodes.fs.js +4 -0
  75. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
  76. package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
  77. package/fable_modules/project_cracked.json +1 -1
  78. package/package.json +1 -1
  79. package/Json/ARC.js +0 -31
  80. package/JsonIO/ARC.js +0 -31
  81. package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs +0 -310
  82. package/fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js +0 -166
  83. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/DynamicObj.fableproj +0 -0
  84. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/FableJS.fs.js +0 -0
  85. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs +0 -0
  86. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/PropertyHelper.fs.js +0 -0
  87. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs +0 -0
  88. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/ReflectionUtils.fs.js +0 -0
  89. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  90. /package/fable_modules/{DynamicObj.4.0.3 → DynamicObj.7.0.1}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/ARC.js CHANGED
@@ -1,9 +1,9 @@
1
- import { append as append_1, contains as contains_1, concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/fable-library-js.4.24.0/Array.js";
1
+ import { append as append_1, contains as contains_2, concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/fable-library-js.4.24.0/Array.js";
2
2
  import { ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contract/ArcAssay.js";
3
3
  import { ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static } from "./Contract/Datamap.js";
4
4
  import { ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F } from "./Contract/ArcStudy.js";
5
5
  import { ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F } from "./Contract/ArcInvestigation.js";
6
- import { toList, collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, contains, toArray } from "./fable_modules/fable-library-js.4.24.0/Seq.js";
6
+ import { toList, collect, empty, find, tryFind, iterate, map as map_1, singleton, append, delay, contains, toArray } from "./fable_modules/fable-library-js.4.24.0/Seq.js";
7
7
  import { FileSystemTree } from "./FileSystem/FileSystemTree.js";
8
8
  import { FileSystem } from "./FileSystem/FileSystem.js";
9
9
  import { bind, map as map_2, defaultArg, value as value_2, unwrap } from "./fable_modules/fable-library-js.4.24.0/Option.js";
@@ -12,10 +12,12 @@ import { PromiseBuilder__Delay_62FBFDE1, PromiseBuilder__Run_212F1D4B } from "./
12
12
  import { promise } from "./fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js";
13
13
  import { getAllFilePathsAsync } from "./ContractIO/FileSystemHelper.js";
14
14
  import { FSharpResult$2 } from "./fable_modules/fable-library-js.4.24.0/Result.js";
15
- import { comparePrimitives, safeHash, stringHash } from "./fable_modules/fable-library-js.4.24.0/Util.js";
15
+ import { safeHash, curry2, comparePrimitives, stringHash } from "./fable_modules/fable-library-js.4.24.0/Util.js";
16
16
  import { getStudyFolderPath, getAssayFolderPath } from "./FileSystem/Path.js";
17
17
  import { toText, printf, toFail, join, replace } from "./fable_modules/fable-library-js.4.24.0/String.js";
18
18
  import { Contract } from "./Contract/Contract.js";
19
+ import { FSharpSet__Contains, unionMany, contains as contains_1, ofSeq } from "./fable_modules/fable-library-js.4.24.0/Set.js";
20
+ import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4, DataMap__get_DataContexts } from "./Core/DataMap.js";
19
21
  import { tryISAReadContractFromPath } from "./Contract/ARC.js";
20
22
  import { ArcTables } from "./Core/Table/ArcTables.js";
21
23
  import { addToDict } from "./fable_modules/fable-library-js.4.24.0/MapUtil.js";
@@ -23,15 +25,13 @@ import { ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF
23
25
  import { ArcInvestigation } from "./Core/ArcTypes.js";
24
26
  import { Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
25
27
  import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522 } from "./Spreadsheet/ArcStudy.js";
26
- import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/DataMap.js";
27
28
  import { toFsWorkbook } from "./Spreadsheet/DataMap.js";
28
29
  import { ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F } from "./Spreadsheet/ArcAssay.js";
29
30
  import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.3.1/Cells/FsCellsCollection.fs.js";
30
31
  import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, gitattributesContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
31
- import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library-js.4.24.0/Set.js";
32
32
  import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library-js.4.24.0/Map.js";
33
33
  import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js";
34
- import { encoder, decoder as decoder_1 } from "./JsonIO/ARC.js";
34
+ import { ROCrate_encoder_8A8D439, ROCrate_get_decoder, ROCrate_get_decoderDeprecated } from "./ROCrateIO.js";
35
35
  import { toString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js";
36
36
  import { defaultSpaces } from "./Json/Encode.js";
37
37
  import { ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F, ValidationPackagesConfigHelper_ReadContract, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55, ValidationPackagesConfigHelper_ConfigFilePath } from "./Contract/ValidationPackagesConfig.js";
@@ -355,6 +355,77 @@ export class ARC {
355
355
  }
356
356
  }))));
357
357
  }
358
+ MakeDataFilesAbsolute() {
359
+ const this$ = this;
360
+ const filesPaths = ofSeq(this$.FileSystem.Tree.ToFilePaths(), {
361
+ Compare: comparePrimitives,
362
+ });
363
+ const checkExistenceFromRoot = (p) => contains_1(p, filesPaths);
364
+ const updateColumnOption = (dataNameFunction, col) => {
365
+ let col_1;
366
+ let matchResult, col_2;
367
+ if (col != null) {
368
+ if ((col_1 = col, col_1.Header.IsDataColumn)) {
369
+ matchResult = 0;
370
+ col_2 = col;
371
+ }
372
+ else {
373
+ matchResult = 1;
374
+ }
375
+ }
376
+ else {
377
+ matchResult = 1;
378
+ }
379
+ switch (matchResult) {
380
+ case 0: {
381
+ col_2.Cells.forEach((c) => {
382
+ if (c.AsData.FilePath != null) {
383
+ const newFilePath = dataNameFunction(c.AsData);
384
+ c.AsData.FilePath = newFilePath;
385
+ }
386
+ });
387
+ break;
388
+ }
389
+ case 1: {
390
+ break;
391
+ }
392
+ }
393
+ };
394
+ const updateTable = (dataNameFunction_1, t) => {
395
+ updateColumnOption(dataNameFunction_1, t.TryGetInputColumn());
396
+ updateColumnOption(dataNameFunction_1, t.TryGetOutputColumn());
397
+ };
398
+ const updateDataMap = (dataNameFunction_2, dm) => {
399
+ iterate((c_1) => {
400
+ if (c_1.FilePath != null) {
401
+ const newFilePath_1 = dataNameFunction_2(c_1);
402
+ c_1.FilePath = newFilePath_1;
403
+ }
404
+ }, DataMap__get_DataContexts(dm));
405
+ };
406
+ const matchValue = this$.ISA;
407
+ if (matchValue == null) {
408
+ }
409
+ else {
410
+ const inv = matchValue;
411
+ iterate((s) => {
412
+ const f = (d) => d.GetAbsolutePathForStudy(s.Identifier, checkExistenceFromRoot);
413
+ const source_1 = s.Tables;
414
+ iterate(curry2(updateTable)(f), source_1);
415
+ if (s.DataMap != null) {
416
+ updateDataMap(f, value_2(s.DataMap));
417
+ }
418
+ }, inv.Studies);
419
+ iterate((a) => {
420
+ const f_1 = (d_1) => d_1.GetAbsolutePathForAssay(a.Identifier, checkExistenceFromRoot);
421
+ const source_3 = a.Tables;
422
+ iterate(curry2(updateTable)(f_1), source_3);
423
+ if (a.DataMap != null) {
424
+ updateDataMap(f_1, value_2(a.DataMap));
425
+ }
426
+ }, inv.Assays);
427
+ }
428
+ }
358
429
  static fromFilePaths(filePaths) {
359
430
  return new ARC(undefined, undefined, FileSystem.fromFilePaths(filePaths));
360
431
  }
@@ -648,15 +719,35 @@ export class ARC {
648
719
  Compare: comparePrimitives,
649
720
  });
650
721
  }
722
+ static fromDeprecatedROCrateJsonString(s) {
723
+ let matchValue;
724
+ try {
725
+ const s_1 = replace(s, "bio:additionalProperty", "sdo:additionalProperty");
726
+ return new ARC((matchValue = fromString(ROCrate_get_decoderDeprecated(), s_1), (matchValue.tag === 1) ? (() => {
727
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
728
+ })() : matchValue.fields[0]));
729
+ }
730
+ catch (ex) {
731
+ const arg_1 = ex.message;
732
+ return toFail(printf("Could not parse deprecated ARC-RO-Crate metadata: \n%s"))(arg_1);
733
+ }
734
+ }
651
735
  static fromROCrateJsonString(s) {
652
736
  let matchValue;
653
- return new ARC(unwrap((matchValue = fromString(decoder_1, s), (matchValue.tag === 1) ? (() => {
654
- throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
655
- })() : matchValue.fields[0])));
737
+ try {
738
+ return new ARC((matchValue = fromString(ROCrate_get_decoder(), s), (matchValue.tag === 1) ? (() => {
739
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
740
+ })() : matchValue.fields[0]));
741
+ }
742
+ catch (ex) {
743
+ const arg_1 = ex.message;
744
+ return toFail(printf("Could not parse ARC-RO-Crate metadata: \n%s"))(arg_1);
745
+ }
656
746
  }
657
747
  ToROCrateJsonString(spaces) {
658
748
  const this$ = this;
659
- const value = encoder(value_2(this$._isa));
749
+ this$.MakeDataFilesAbsolute();
750
+ const value = ROCrate_encoder_8A8D439(value_2(this$._isa));
660
751
  return toString(defaultSpaces(spaces), value);
661
752
  }
662
753
  static toROCrateJsonString(spaces) {
@@ -665,7 +756,7 @@ export class ARC {
665
756
  GetValidationPackagesConfigWriteContract(vpc) {
666
757
  const this$ = this;
667
758
  const paths = this$.FileSystem.Tree.ToFilePaths();
668
- if (!contains_1(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
759
+ if (!contains_2(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
669
760
  Equals: (x, y) => (x === y),
670
761
  GetHashCode: stringHash,
671
762
  })) {
@@ -677,7 +768,7 @@ export class ARC {
677
768
  GetValidationPackagesConfigDeleteContract(vpc) {
678
769
  const this$ = this;
679
770
  const paths = this$.FileSystem.Tree.ToFilePaths();
680
- if (contains_1(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
771
+ if (contains_2(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
681
772
  Equals: (x, y) => (x === y),
682
773
  GetHashCode: stringHash,
683
774
  })) {
package/CWL/CWLTypes.js CHANGED
@@ -1,8 +1,8 @@
1
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
1
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
2
2
  import { array_type, union_type, record_type, bool_type, option_type, string_type, class_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
3
3
  import { FSharpRef, Union, Record } from "../fable_modules/fable-library-js.4.24.0/Types.js";
4
4
  import { defaultOf } from "../fable_modules/fable-library-js.4.24.0/Util.js";
5
- import { setProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
5
+ import { setProperty } from "../fable_modules/DynamicObj.7.0.1/DynObj.fs.js";
6
6
 
7
7
  export class FileInstance extends DynamicObj {
8
8
  constructor() {
package/CWL/Decode.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.4.24.0/Util.js";
2
- import { setOptionalProperty, setProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
3
- import { DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
2
+ import { setOptionalProperty, setProperty } from "../fable_modules/DynamicObj.7.0.1/DynObj.fs.js";
3
+ import { DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
4
4
  import { ofArray, tail, head, isEmpty, empty, map, iterate } from "../fable_modules/fable-library-js.4.24.0/List.js";
5
5
  import { read, int, float, resizearray, map as map_1, bool, string, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
6
6
  import { replace, toFail, printf, toText } from "../fable_modules/fable-library-js.4.24.0/String.js";
package/CWL/Inputs.js CHANGED
@@ -3,8 +3,8 @@ import { class_type, record_type, bool_type, int32_type, option_type, string_typ
3
3
  import { value, unwrap } from "../fable_modules/fable-library-js.4.24.0/Option.js";
4
4
  import { CWLType } from "./CWLTypes.js";
5
5
  import { defaultOf } from "../fable_modules/fable-library-js.4.24.0/Util.js";
6
- import { setOptionalProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
7
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
6
+ import { setOptionalProperty } from "../fable_modules/DynamicObj.7.0.1/DynObj.fs.js";
7
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
8
8
 
9
9
  export class InputBinding extends Record {
10
10
  constructor(Prefix, Position, ItemSeparator, Separate) {
package/CWL/Outputs.js CHANGED
@@ -3,8 +3,8 @@ import { class_type, record_type, option_type, string_type } from "../fable_modu
3
3
  import { value, unwrap } from "../fable_modules/fable-library-js.4.24.0/Option.js";
4
4
  import { CWLType } from "./CWLTypes.js";
5
5
  import { defaultOf } from "../fable_modules/fable-library-js.4.24.0/Util.js";
6
- import { setOptionalProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
7
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
6
+ import { setOptionalProperty } from "../fable_modules/DynamicObj.7.0.1/DynObj.fs.js";
7
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
8
8
 
9
9
  export class OutputBinding extends Record {
10
10
  constructor(Glob) {
@@ -1,8 +1,8 @@
1
1
  import { Union, FSharpRef, Record } from "../fable_modules/fable-library-js.4.24.0/Types.js";
2
2
  import { union_type, float64_type, array_type, record_type, class_type, option_type, string_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
3
3
  import { defaultOf } from "../fable_modules/fable-library-js.4.24.0/Util.js";
4
- import { setOptionalProperty } from "../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
5
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
4
+ import { setOptionalProperty } from "../fable_modules/DynamicObj.7.0.1/DynObj.fs.js";
5
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
6
6
  import { CWLType_$reflection, SoftwarePackage_$reflection, SchemaDefRequirementType_$reflection } from "./CWLTypes.js";
7
7
 
8
8
  export class DockerRequirement extends Record {
@@ -1,5 +1,5 @@
1
1
  import { defaultArg, unwrap } from "../fable_modules/fable-library-js.4.24.0/Option.js";
2
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
2
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
3
3
  import { class_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
4
4
 
5
5
  export class CWLToolDescription extends DynamicObj {
@@ -1,5 +1,5 @@
1
1
  import { defaultArg, unwrap } from "../fable_modules/fable-library-js.4.24.0/Option.js";
2
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
2
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
3
3
  import { class_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
4
4
 
5
5
  export class CWLWorkflowDescription extends DynamicObj {
@@ -1,7 +1,7 @@
1
1
  import { Record } from "../fable_modules/fable-library-js.4.24.0/Types.js";
2
2
  import { class_type, array_type, record_type, option_type, string_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
3
3
  import { unwrap } from "../fable_modules/fable-library-js.4.24.0/Option.js";
4
- import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
4
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js";
5
5
 
6
6
  export class StepInput extends Record {
7
7
  constructor(Id, Source, DefaultValue, ValueFrom) {
package/ColumnIndex.js ADDED
@@ -0,0 +1,258 @@
1
+ import { tryParse } from "./fable_modules/fable-library-js.4.24.0/Int32.js";
2
+ import { FSharpRef } from "./fable_modules/fable-library-js.4.24.0/Types.js";
3
+ import { Comment$ } from "./Core/Comment.js";
4
+ import { equals, int32ToString } from "./fable_modules/fable-library-js.4.24.0/Util.js";
5
+ import { tryItem } from "./Core/CommentList.js";
6
+ import { findIndex } from "./fable_modules/fable-library-js.4.24.0/Seq.js";
7
+ import { value, bind } from "./fable_modules/fable-library-js.4.24.0/Option.js";
8
+ import { Factor } from "./Core/Process/Factor.js";
9
+ import { MaterialAttribute_fromString_5980DC03 } from "./Core/Process/MaterialAttribute.js";
10
+ import { ProtocolParameter } from "./Core/Process/ProtocolParameter.js";
11
+ import { Component_fromISAString_7C9A7CF8 } from "./Core/Process/Component.js";
12
+
13
+ function tryInt(str) {
14
+ let matchValue;
15
+ let outArg = 0;
16
+ matchValue = [tryParse(str, 511, false, 32, new FSharpRef(() => outArg, (v) => {
17
+ outArg = (v | 0);
18
+ })), outArg];
19
+ if (matchValue[0]) {
20
+ return matchValue[1];
21
+ }
22
+ else {
23
+ return undefined;
24
+ }
25
+ }
26
+
27
+ export const orderName = "ColumnIndex";
28
+
29
+ export function createOrderComment(index) {
30
+ return Comment$.create(orderName, int32ToString(index));
31
+ }
32
+
33
+ export function tryGetIndex(comments) {
34
+ const matchValue = tryItem(orderName, comments);
35
+ if (matchValue != null) {
36
+ const ci = matchValue;
37
+ const i = findIndex((c) => equals(c.Name, orderName), comments) | 0;
38
+ comments.splice(i, 1);
39
+ return tryInt(ci);
40
+ }
41
+ else {
42
+ return undefined;
43
+ }
44
+ }
45
+
46
+ export function setOntologyAnnotationIndexInplace(i, oa) {
47
+ void (oa.Comments.push(createOrderComment(i)));
48
+ }
49
+
50
+ export function setOntologyAnnotationIndex(i, oa) {
51
+ const oac = oa.Copy();
52
+ setOntologyAnnotationIndexInplace(i, oac);
53
+ return oac;
54
+ }
55
+
56
+ export function tryGetOntologyAnnotationIndex(oa) {
57
+ return tryGetIndex(oa.Comments);
58
+ }
59
+
60
+ export function tryGetParameterIndex(param) {
61
+ return bind((oa) => tryGetIndex(oa.Comments), param.ParameterName);
62
+ }
63
+
64
+ export function tryGetParameterColumnIndex(paramValue) {
65
+ return bind(tryGetParameterIndex, paramValue.Category);
66
+ }
67
+
68
+ export function tryGetFactorIndex(factor) {
69
+ return bind((oa) => tryGetIndex(oa.Comments), factor.FactorType);
70
+ }
71
+
72
+ export function tryGetFactorColumnIndex(factorValue) {
73
+ return bind(tryGetFactorIndex, factorValue.Category);
74
+ }
75
+
76
+ export function tryGetCharacteristicIndex(characteristic) {
77
+ return bind((oa) => tryGetIndex(oa.Comments), characteristic.CharacteristicType);
78
+ }
79
+
80
+ export function tryGetCharacteristicColumnIndex(characteristicValue) {
81
+ return bind(tryGetCharacteristicIndex, characteristicValue.Category);
82
+ }
83
+
84
+ export function tryGetComponentIndex(comp) {
85
+ return bind((oa) => tryGetIndex(oa.Comments), comp.ComponentType);
86
+ }
87
+
88
+ /**
89
+ * Create a ISAJson Factor from ISATab string entries
90
+ */
91
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_fromStringWithColumnIndex_Static(name, term, source, accession, valueIndex) {
92
+ return Factor.fromString(name, term, source, accession, [createOrderComment(valueIndex)]);
93
+ }
94
+
95
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_getColumnIndex_Static_ZDED3A0F(f) {
96
+ return value(tryGetOntologyAnnotationIndex(f));
97
+ }
98
+
99
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_GetColumnIndex(this$) {
100
+ return value(tryGetOntologyAnnotationIndex(this$));
101
+ }
102
+
103
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_tryGetColumnIndex_Static_ZDED3A0F(f) {
104
+ return tryGetOntologyAnnotationIndex(f);
105
+ }
106
+
107
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_TryGetColumnIndex(this$) {
108
+ return tryGetOntologyAnnotationIndex(this$);
109
+ }
110
+
111
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(i, oa) {
112
+ return setOntologyAnnotationIndex(i, oa);
113
+ }
114
+
115
+ export function ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(this$, i) {
116
+ setOntologyAnnotationIndexInplace(i, this$);
117
+ }
118
+
119
+ /**
120
+ * Create a ISAJson Factor from ISATab string entries
121
+ */
122
+ export function ARCtrl_Process_Factor__Factor_fromStringWithColumnIndex_Static(name, term, source, accession, valueIndex) {
123
+ return Factor.fromString(name, term, source, accession, [createOrderComment(valueIndex)]);
124
+ }
125
+
126
+ export function ARCtrl_Process_Factor__Factor_getColumnIndex_Static_7206F0D9(f) {
127
+ return value(tryGetFactorIndex(f));
128
+ }
129
+
130
+ export function ARCtrl_Process_Factor__Factor_GetColumnIndex(this$) {
131
+ return value(tryGetFactorIndex(this$));
132
+ }
133
+
134
+ export function ARCtrl_Process_Factor__Factor_tryGetColumnIndex_Static_7206F0D9(f) {
135
+ return tryGetFactorIndex(f);
136
+ }
137
+
138
+ export function ARCtrl_Process_Factor__Factor_TryGetColumnIndex(this$) {
139
+ return tryGetFactorIndex(this$);
140
+ }
141
+
142
+ export function ARCtrl_Process_FactorValue__FactorValue_getColumnIndex_Static_7105C732(f) {
143
+ return value(tryGetFactorColumnIndex(f));
144
+ }
145
+
146
+ export function ARCtrl_Process_FactorValue__FactorValue_GetColumnIndex(this$) {
147
+ return value(tryGetFactorColumnIndex(this$));
148
+ }
149
+
150
+ export function ARCtrl_Process_FactorValue__FactorValue_tryGetColumnIndex_Static_7105C732(f) {
151
+ return tryGetFactorColumnIndex(f);
152
+ }
153
+
154
+ export function ARCtrl_Process_FactorValue__FactorValue_TryGetColumnIndex(this$) {
155
+ return tryGetFactorColumnIndex(this$);
156
+ }
157
+
158
+ /**
159
+ * Create a ISAJson characteristic from ISATab string entries
160
+ */
161
+ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_fromStringWithColumnIndex_Static(term, source, accession, valueIndex) {
162
+ return MaterialAttribute_fromString_5980DC03(term, source, accession, [createOrderComment(valueIndex)]);
163
+ }
164
+
165
+ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_getColumnIndex_Static_Z1E3B85DD(m) {
166
+ return value(tryGetCharacteristicIndex(m));
167
+ }
168
+
169
+ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_GetColumnIndex(this$) {
170
+ return value(tryGetCharacteristicIndex(this$));
171
+ }
172
+
173
+ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_tryGetColumnIndex_Static_Z1E3B85DD(m) {
174
+ return tryGetCharacteristicIndex(m);
175
+ }
176
+
177
+ export function ARCtrl_Process_MaterialAttribute__MaterialAttribute_TryGetColumnIndex(this$) {
178
+ return tryGetCharacteristicIndex(this$);
179
+ }
180
+
181
+ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_getColumnIndex_Static_Z772273B8(m) {
182
+ return value(tryGetCharacteristicColumnIndex(m));
183
+ }
184
+
185
+ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_GetColumnIndex(this$) {
186
+ return value(tryGetCharacteristicColumnIndex(this$));
187
+ }
188
+
189
+ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_tryGetColumnIndex_Static_Z772273B8(m) {
190
+ return tryGetCharacteristicColumnIndex(m);
191
+ }
192
+
193
+ export function ARCtrl_Process_MaterialAttributeValue__MaterialAttributeValue_TryGetColumnIndex(this$) {
194
+ return tryGetCharacteristicColumnIndex(this$);
195
+ }
196
+
197
+ /**
198
+ * Create a ISAJson parameter from ISATab string entries
199
+ */
200
+ export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_fromStringWithColumnIndex_Static(term, source, accession, valueIndex) {
201
+ return ProtocolParameter.fromString(term, source, accession, [createOrderComment(valueIndex)]);
202
+ }
203
+
204
+ export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_getColumnIndex_Static_Z11F87B15(p) {
205
+ return value(tryGetParameterIndex(p));
206
+ }
207
+
208
+ export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_GetColumnIndex(this$) {
209
+ return value(tryGetParameterIndex(this$));
210
+ }
211
+
212
+ export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_tryGetColumnIndex_Static_Z11F87B15(p) {
213
+ return tryGetParameterIndex(p);
214
+ }
215
+
216
+ export function ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex(this$) {
217
+ return tryGetParameterIndex(this$);
218
+ }
219
+
220
+ export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_getColumnIndex_Static_Z1576263(p) {
221
+ return value(tryGetParameterColumnIndex(p));
222
+ }
223
+
224
+ export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_GetColumnIndex(this$) {
225
+ return value(tryGetParameterColumnIndex(this$));
226
+ }
227
+
228
+ export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_tryGetColumnIndex_Static_Z1576263(p) {
229
+ return tryGetParameterColumnIndex(p);
230
+ }
231
+
232
+ export function ARCtrl_Process_ProcessParameterValue__ProcessParameterValue_TryGetColumnIndex(this$) {
233
+ return tryGetParameterColumnIndex(this$);
234
+ }
235
+
236
+ /**
237
+ * Create a ISAJson Factor from ISATab string entries
238
+ */
239
+ export function ARCtrl_Process_Component__Component_fromStringWithColumnIndex_Static(name, term, source, accession, valueIndex) {
240
+ return Component_fromISAString_7C9A7CF8(name, term, source, accession, [createOrderComment(valueIndex)]);
241
+ }
242
+
243
+ export function ARCtrl_Process_Component__Component_getColumnIndex_Static_Z685B8F25(f) {
244
+ return value(tryGetComponentIndex(f));
245
+ }
246
+
247
+ export function ARCtrl_Process_Component__Component_GetColumnIndex(this$) {
248
+ return value(tryGetComponentIndex(this$));
249
+ }
250
+
251
+ export function ARCtrl_Process_Component__Component_tryGetColumnIndex_Static_Z685B8F25(f) {
252
+ return tryGetComponentIndex(f);
253
+ }
254
+
255
+ export function ARCtrl_Process_Component__Component_TryGetColumnIndex(this$) {
256
+ return tryGetComponentIndex(this$);
257
+ }
258
+