@nfdi4plants/arctrl 1.0.0-alpha6
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/ARCtrl.js +257 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +326 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Templates.Json.js +40 -0
- package/Templates/Templates.Spreadsheet.js +315 -0
- package/Templates/Templates.js +179 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/package.json +22 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { toString, nil, object as object_36 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
2
|
+
import { ofArray, choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
3
|
+
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
4
|
+
import { tryInclude } from "./GEncode.js";
|
|
5
|
+
import { Sample_decoder, Source_decoder, Sample_encoder, Source_encoder } from "./Data.js";
|
|
6
|
+
import { MaterialAttribute_decoder, MaterialAttribute_encoder, Material_decoder, Material_encoder } from "./Material.js";
|
|
7
|
+
import { string, list as list_1, object as object_37 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
8
|
+
import { StudyMaterials } from "../ISA/JsonTypes/StudyMaterials.js";
|
|
9
|
+
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
10
|
+
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
11
|
+
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
12
|
+
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
13
|
+
import { decoder as decoder_10, encoder } from "./Publication.js";
|
|
14
|
+
import { decoder as decoder_11, encoder as encoder_1 } from "./Person.js";
|
|
15
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
16
|
+
import { Protocol_decoder, Protocol_encoder } from "./Protocol.js";
|
|
17
|
+
import { Process_decoder, Process_encoder } from "./Process.js";
|
|
18
|
+
import { Assay_decoder, Assay_encoder } from "./Assay.js";
|
|
19
|
+
import { Factor_decoder, Factor_encoder } from "./Factor.js";
|
|
20
|
+
import { decoder as decoder_12, encoder as encoder_2 } from "./Comment.js";
|
|
21
|
+
import { fromString, uri } from "./Decode.js";
|
|
22
|
+
import { Study } from "../ISA/JsonTypes/Study.js";
|
|
23
|
+
import { ArcStudy } from "../ISA/ArcTypes/ArcTypes.js";
|
|
24
|
+
|
|
25
|
+
export function StudyMaterials_encoder(options, oa) {
|
|
26
|
+
return object_36(choose((tupledArg) => {
|
|
27
|
+
const v = tupledArg[1];
|
|
28
|
+
if (equals(v, nil)) {
|
|
29
|
+
return void 0;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return [tupledArg[0], v];
|
|
33
|
+
}
|
|
34
|
+
}, ofArray([tryInclude("sources", (oa_1) => Source_encoder(options, oa_1), oa["Sources"]), tryInclude("samples", (oa_2) => Sample_encoder(options, oa_2), oa["Samples"]), tryInclude("otherMaterials", (oa_3) => Material_encoder(options, oa_3), oa["OtherMaterials"])])));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function StudyMaterials_decoder(options) {
|
|
38
|
+
return (path_3) => ((v) => object_37((get$) => {
|
|
39
|
+
let objectArg, objectArg_1, objectArg_2;
|
|
40
|
+
return new StudyMaterials((objectArg = get$.Optional, objectArg.Field("sources", (path, value) => list_1((s, json) => Source_decoder(options, s, json), path, value))), (objectArg_1 = get$.Optional, objectArg_1.Field("samples", (path_1, value_1) => list_1((s_1, json_1) => Sample_decoder(options, s_1, json_1), path_1, value_1))), (objectArg_2 = get$.Optional, objectArg_2.Field("otherMaterials", (path_2, value_2) => list_1((s_2, json_2) => Material_decoder(options, s_2, json_2), path_2, value_2))));
|
|
41
|
+
}, path_3, v));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function Study_genID(s) {
|
|
45
|
+
const matchValue = s.ID;
|
|
46
|
+
if (matchValue == null) {
|
|
47
|
+
const matchValue_1 = s.FileName;
|
|
48
|
+
if (matchValue_1 == null) {
|
|
49
|
+
const matchValue_2 = s.Identifier;
|
|
50
|
+
if (matchValue_2 == null) {
|
|
51
|
+
const matchValue_3 = s.Title;
|
|
52
|
+
if (matchValue_3 == null) {
|
|
53
|
+
return "#EmptyStudy";
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return "#Study_" + replace(matchValue_3, " ", "_");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return "#Study_" + replace(matchValue_2, " ", "_");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return "#Study" + replace(matchValue_1, " ", "_");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return URIModule_toString(matchValue);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function Study_encoder(options, oa) {
|
|
73
|
+
return object_36(choose((tupledArg) => {
|
|
74
|
+
const v = tupledArg[1];
|
|
75
|
+
if (equals(v, nil)) {
|
|
76
|
+
return void 0;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return [tupledArg[0], v];
|
|
80
|
+
}
|
|
81
|
+
}, toList(delay(() => {
|
|
82
|
+
let value, s_1;
|
|
83
|
+
return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Study_genID(oa), (typeof value === "string") ? ((s_1 = value, s_1)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
|
|
84
|
+
let s_2;
|
|
85
|
+
const value_3 = value_2;
|
|
86
|
+
return (typeof value_3 === "string") ? ((s_2 = value_3, s_2)) : nil;
|
|
87
|
+
}, oa["ID"])), delay(() => {
|
|
88
|
+
let value_5, s_3;
|
|
89
|
+
return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Study", (typeof value_5 === "string") ? ((s_3 = value_5, s_3)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("filename", (value_7) => {
|
|
90
|
+
let s_4;
|
|
91
|
+
const value_8 = value_7;
|
|
92
|
+
return (typeof value_8 === "string") ? ((s_4 = value_8, s_4)) : nil;
|
|
93
|
+
}, oa["FileName"])), delay(() => append(singleton(tryInclude("identifier", (value_10) => {
|
|
94
|
+
let s_5;
|
|
95
|
+
const value_11 = value_10;
|
|
96
|
+
return (typeof value_11 === "string") ? ((s_5 = value_11, s_5)) : nil;
|
|
97
|
+
}, oa["Identifier"])), delay(() => append(singleton(tryInclude("title", (value_13) => {
|
|
98
|
+
let s_6;
|
|
99
|
+
const value_14 = value_13;
|
|
100
|
+
return (typeof value_14 === "string") ? ((s_6 = value_14, s_6)) : nil;
|
|
101
|
+
}, oa["Title"])), delay(() => append(singleton(tryInclude("description", (value_16) => {
|
|
102
|
+
let s_7;
|
|
103
|
+
const value_17 = value_16;
|
|
104
|
+
return (typeof value_17 === "string") ? ((s_7 = value_17, s_7)) : nil;
|
|
105
|
+
}, oa["Description"])), delay(() => append(singleton(tryInclude("submissionDate", (value_19) => {
|
|
106
|
+
let s_8;
|
|
107
|
+
const value_20 = value_19;
|
|
108
|
+
return (typeof value_20 === "string") ? ((s_8 = value_20, s_8)) : nil;
|
|
109
|
+
}, oa["SubmissionDate"])), delay(() => append(singleton(tryInclude("publicReleaseDate", (value_22) => {
|
|
110
|
+
let s_9;
|
|
111
|
+
const value_23 = value_22;
|
|
112
|
+
return (typeof value_23 === "string") ? ((s_9 = value_23, s_9)) : nil;
|
|
113
|
+
}, oa["PublicReleaseDate"])), delay(() => append(singleton(tryInclude("publications", (oa_1) => encoder(options, oa_1), oa["Publications"])), delay(() => append(singleton(tryInclude("people", (oa_2) => encoder_1(options, oa_2), oa["Contacts"])), delay(() => append(singleton(tryInclude("studyDesignDescriptors", (oa_3) => OntologyAnnotation_encoder(options, oa_3), oa["StudyDesignDescriptors"])), delay(() => append(singleton(tryInclude("protocols", (oa_4) => Protocol_encoder(options, oa_4), oa["Protocols"])), delay(() => append(singleton(tryInclude("materials", (oa_5) => StudyMaterials_encoder(options, oa_5), oa["Materials"])), delay(() => append(singleton(tryInclude("processSequence", (oa_6) => Process_encoder(options, oa_6), oa["ProcessSequence"])), delay(() => append(singleton(tryInclude("assays", (oa_7) => Assay_encoder(options, oa_7), oa["Assays"])), delay(() => append(singleton(tryInclude("factors", (oa_8) => Factor_encoder(options, oa_8), oa["Factors"])), delay(() => append(singleton(tryInclude("characteristicCategories", (oa_9) => MaterialAttribute_encoder(options, oa_9), oa["CharacteristicCategories"])), delay(() => append(singleton(tryInclude("unitCategories", (oa_10) => OntologyAnnotation_encoder(options, oa_10), oa["UnitCategories"])), delay(() => singleton(tryInclude("comments", (comment) => encoder_2(options, comment), oa["Comments"]))))))))))))))))))))))))))))))))))));
|
|
114
|
+
}));
|
|
115
|
+
}))));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function Study_decoder(options) {
|
|
119
|
+
return (path_16) => ((v) => object_37((get$) => {
|
|
120
|
+
let arg_33, decoder_8, objectArg_16, arg_35, decoder_9, objectArg_17;
|
|
121
|
+
let ID;
|
|
122
|
+
const objectArg = get$.Optional;
|
|
123
|
+
ID = objectArg.Field("@id", uri);
|
|
124
|
+
let FileName;
|
|
125
|
+
const objectArg_1 = get$.Optional;
|
|
126
|
+
FileName = objectArg_1.Field("filename", string);
|
|
127
|
+
let Identifier;
|
|
128
|
+
const objectArg_2 = get$.Optional;
|
|
129
|
+
Identifier = objectArg_2.Field("identifier", string);
|
|
130
|
+
let Title;
|
|
131
|
+
const objectArg_3 = get$.Optional;
|
|
132
|
+
Title = objectArg_3.Field("title", string);
|
|
133
|
+
let Description;
|
|
134
|
+
const objectArg_4 = get$.Optional;
|
|
135
|
+
Description = objectArg_4.Field("description", string);
|
|
136
|
+
let SubmissionDate;
|
|
137
|
+
const objectArg_5 = get$.Optional;
|
|
138
|
+
SubmissionDate = objectArg_5.Field("submissionDate", string);
|
|
139
|
+
let PublicReleaseDate;
|
|
140
|
+
const objectArg_6 = get$.Optional;
|
|
141
|
+
PublicReleaseDate = objectArg_6.Field("publicReleaseDate", string);
|
|
142
|
+
let Publications;
|
|
143
|
+
let arg_15;
|
|
144
|
+
const decoder = decoder_10(options);
|
|
145
|
+
arg_15 = ((path_6) => ((value_6) => list_1(uncurry2(decoder), path_6, value_6)));
|
|
146
|
+
const objectArg_7 = get$.Optional;
|
|
147
|
+
Publications = objectArg_7.Field("publications", uncurry2(arg_15));
|
|
148
|
+
let Contacts;
|
|
149
|
+
let arg_17;
|
|
150
|
+
const decoder_1 = decoder_11(options);
|
|
151
|
+
arg_17 = ((path_7) => ((value_7) => list_1(uncurry2(decoder_1), path_7, value_7)));
|
|
152
|
+
const objectArg_8 = get$.Optional;
|
|
153
|
+
Contacts = objectArg_8.Field("people", uncurry2(arg_17));
|
|
154
|
+
let StudyDesignDescriptors;
|
|
155
|
+
let arg_19;
|
|
156
|
+
const decoder_2 = OntologyAnnotation_decoder(options);
|
|
157
|
+
arg_19 = ((path_8) => ((value_8) => list_1(uncurry2(decoder_2), path_8, value_8)));
|
|
158
|
+
const objectArg_9 = get$.Optional;
|
|
159
|
+
StudyDesignDescriptors = objectArg_9.Field("studyDesignDescriptors", uncurry2(arg_19));
|
|
160
|
+
let Protocols;
|
|
161
|
+
let arg_21;
|
|
162
|
+
const decoder_3 = Protocol_decoder(options);
|
|
163
|
+
arg_21 = ((path_9) => ((value_9) => list_1(uncurry2(decoder_3), path_9, value_9)));
|
|
164
|
+
const objectArg_10 = get$.Optional;
|
|
165
|
+
Protocols = objectArg_10.Field("protocols", uncurry2(arg_21));
|
|
166
|
+
let Materials;
|
|
167
|
+
const arg_23 = StudyMaterials_decoder(options);
|
|
168
|
+
const objectArg_11 = get$.Optional;
|
|
169
|
+
Materials = objectArg_11.Field("materials", uncurry2(arg_23));
|
|
170
|
+
let Assays;
|
|
171
|
+
let arg_25;
|
|
172
|
+
const decoder_4 = Assay_decoder(options);
|
|
173
|
+
arg_25 = ((path_10) => ((value_10) => list_1(uncurry2(decoder_4), path_10, value_10)));
|
|
174
|
+
const objectArg_12 = get$.Optional;
|
|
175
|
+
Assays = objectArg_12.Field("assays", uncurry2(arg_25));
|
|
176
|
+
let Factors;
|
|
177
|
+
let arg_27;
|
|
178
|
+
const decoder_5 = Factor_decoder(options);
|
|
179
|
+
arg_27 = ((path_11) => ((value_11) => list_1(uncurry2(decoder_5), path_11, value_11)));
|
|
180
|
+
const objectArg_13 = get$.Optional;
|
|
181
|
+
Factors = objectArg_13.Field("factors", uncurry2(arg_27));
|
|
182
|
+
let CharacteristicCategories;
|
|
183
|
+
let arg_29;
|
|
184
|
+
const decoder_6 = MaterialAttribute_decoder(options);
|
|
185
|
+
arg_29 = ((path_12) => ((value_12) => list_1(uncurry2(decoder_6), path_12, value_12)));
|
|
186
|
+
const objectArg_14 = get$.Optional;
|
|
187
|
+
CharacteristicCategories = objectArg_14.Field("characteristicCategories", uncurry2(arg_29));
|
|
188
|
+
let UnitCategories;
|
|
189
|
+
let arg_31;
|
|
190
|
+
const decoder_7 = OntologyAnnotation_decoder(options);
|
|
191
|
+
arg_31 = ((path_13) => ((value_13) => list_1(uncurry2(decoder_7), path_13, value_13)));
|
|
192
|
+
const objectArg_15 = get$.Optional;
|
|
193
|
+
UnitCategories = objectArg_15.Field("unitCategories", uncurry2(arg_31));
|
|
194
|
+
return new Study(ID, FileName, Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Publications, Contacts, StudyDesignDescriptors, Protocols, Materials, (arg_33 = ((decoder_8 = Process_decoder(options), (path_14) => ((value_14) => list_1(uncurry2(decoder_8), path_14, value_14)))), (objectArg_16 = get$.Optional, objectArg_16.Field("processSequence", uncurry2(arg_33)))), Assays, Factors, CharacteristicCategories, UnitCategories, (arg_35 = ((decoder_9 = decoder_12(options), (path_15) => ((value_15) => list_1(uncurry2(decoder_9), path_15, value_15)))), (objectArg_17 = get$.Optional, objectArg_17.Field("comments", uncurry2(arg_35)))));
|
|
195
|
+
}, path_16, v));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function Study_fromString(s) {
|
|
199
|
+
return fromString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function Study_toString(p) {
|
|
203
|
+
return toString(2, Study_encoder(ConverterOptions_$ctor(), p));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* exports in json-ld format
|
|
208
|
+
*/
|
|
209
|
+
export function Study_toStringLD(s) {
|
|
210
|
+
let returnVal;
|
|
211
|
+
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function ArcStudy_fromString(s) {
|
|
215
|
+
const arg = fromString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
216
|
+
return ArcStudy.fromStudy(arg);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function ArcStudy_toString(a, assays) {
|
|
220
|
+
return toString(2, Study_encoder(ConverterOptions_$ctor(), a.ToStudy(assays)));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* exports in json-ld format
|
|
225
|
+
*/
|
|
226
|
+
export function ArcStudy_toStringLD(a, assays) {
|
|
227
|
+
let returnVal;
|
|
228
|
+
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a.ToStudy(assays)));
|
|
229
|
+
}
|
|
230
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { bool_type, option_type, array_type, record_type, string_type, obj_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
3
|
+
import { map } from "../../../fable_modules/fable-library.4.1.4/Array.js";
|
|
4
|
+
import { singleton } from "../../../fable_modules/fable-library.4.1.4/AsyncBuilder.js";
|
|
5
|
+
import { awaitPromise } from "../../../fable_modules/fable-library.4.1.4/Async.js";
|
|
6
|
+
import * as JsonValidation from "../../../../../src/ISA/ISA.Json/Validation/JsonValidation.js";
|
|
7
|
+
import { value } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
8
|
+
|
|
9
|
+
export class ValidationError extends Record {
|
|
10
|
+
constructor(path, property, message, schema, instance, name, argument, stack) {
|
|
11
|
+
super();
|
|
12
|
+
this.path = path;
|
|
13
|
+
this.property = property;
|
|
14
|
+
this.message = message;
|
|
15
|
+
this.schema = schema;
|
|
16
|
+
this.instance = instance;
|
|
17
|
+
this.name = name;
|
|
18
|
+
this.argument = argument;
|
|
19
|
+
this.stack = stack;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function ValidationError_$reflection() {
|
|
24
|
+
return record_type("ARCtrl.ISA.Json.Fable.ValidationError", [], ValidationError, () => [["path", obj_type], ["property", string_type], ["message", string_type], ["schema", obj_type], ["instance", obj_type], ["name", string_type], ["argument", obj_type], ["stack", string_type]]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function ValidationError__ToErrorString(this$) {
|
|
28
|
+
return `Property ${this$.property} (${this$.instance}) ${this$.message}.`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class ValidatorResult extends Record {
|
|
32
|
+
constructor(instance, schema, options, path, propertyPath, errors, throwError, throFirst, throwAll, disableFormat) {
|
|
33
|
+
super();
|
|
34
|
+
this.instance = instance;
|
|
35
|
+
this.schema = schema;
|
|
36
|
+
this.options = options;
|
|
37
|
+
this.path = path;
|
|
38
|
+
this.propertyPath = propertyPath;
|
|
39
|
+
this.errors = errors;
|
|
40
|
+
this.throwError = throwError;
|
|
41
|
+
this.throFirst = throFirst;
|
|
42
|
+
this.throwAll = throwAll;
|
|
43
|
+
this.disableFormat = disableFormat;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ValidatorResult_$reflection() {
|
|
48
|
+
return record_type("ARCtrl.ISA.Json.Fable.ValidatorResult", [], ValidatorResult, () => [["instance", obj_type], ["schema", obj_type], ["options", obj_type], ["path", array_type(obj_type)], ["propertyPath", string_type], ["errors", array_type(ValidationError_$reflection())], ["throwError", option_type(obj_type)], ["throFirst", option_type(obj_type)], ["throwAll", option_type(obj_type)], ["disableFormat", bool_type]]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ValidatorResult__ToValidationResult(this$) {
|
|
52
|
+
if (this$.errors.length === 0) {
|
|
53
|
+
return [true, []];
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return [false, map(ValidationError__ToErrorString, this$.errors)];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function validate(schemaURL, objectString) {
|
|
61
|
+
let validationResult = void 0;
|
|
62
|
+
return singleton.Delay(() => singleton.Bind(awaitPromise(JsonValidation.validateAgainstSchema(objectString, schemaURL).then((o) => {
|
|
63
|
+
validationResult = o;
|
|
64
|
+
})), () => {
|
|
65
|
+
const output = ValidatorResult__ToValidationResult(value(validationResult));
|
|
66
|
+
return singleton.Return(output);
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { singleton } from "../../../fable_modules/fable-library.4.1.4/AsyncBuilder.js";
|
|
2
|
+
import { validate } from "./Fable.js";
|
|
3
|
+
import { ValidationResult, ValidationResult_OfJSchemaOutput_Z6EC48F6B } from "./ValidationResult.js";
|
|
4
|
+
|
|
5
|
+
export function Validation_validate(schemaURL, objectString) {
|
|
6
|
+
return singleton.Delay(() => singleton.TryWith(singleton.Delay(() => singleton.Bind(validate(schemaURL, objectString), (_arg) => singleton.Return(ValidationResult_OfJSchemaOutput_Z6EC48F6B([_arg[0], _arg[1]])))), (_arg_1) => singleton.Return(new ValidationResult(1, [[_arg_1.message]]))));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Validation_validateAssay(assayString) {
|
|
10
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/assay_schema.json", assayString);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function Validation_validateComment(commentString) {
|
|
14
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/comment_schema.json", commentString);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function Validation_validateData(dataString) {
|
|
18
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/data_schema.json", dataString);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function Validation_validateFactor(factorString) {
|
|
22
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/factor_schema.json", factorString);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function Validation_validateFactorValue(factorValueString) {
|
|
26
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/factor_value_schema.json", factorValueString);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function Validation_validateInvestigation(investigationString) {
|
|
30
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/investigation_schema.json", investigationString);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function Validation_validateMaterialAttribute(materialAttributeString) {
|
|
34
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/material_attribute_schema.json", materialAttributeString);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function Validation_validateMaterialAttributeValue(materialAttributeValueString) {
|
|
38
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/material_attribute_value_schema.json", materialAttributeValueString);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function Validation_validateMaterial(materialString) {
|
|
42
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/material_schema.json", materialString);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function Validation_validateOntologyAnnotation(ontologyAnnotationString) {
|
|
46
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/ontology_annotation_schema.json", ontologyAnnotationString);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function Validation_validateOntologySourceReference(ontologySourceReferenceString) {
|
|
50
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/ontology_source_reference_schema.json", ontologySourceReferenceString);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function Validation_validatePerson(personString) {
|
|
54
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/person_schema.json", personString);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function Validation_validateProcessParameterValue(processParameterValueString) {
|
|
58
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/process_parameter_value_schema.json", processParameterValueString);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function Validation_validateProcess(processString) {
|
|
62
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/process_schema.json", processString);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function Validation_validateProtocolParameter(protocolParameterString) {
|
|
66
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/protocol_parameter_schema.json", protocolParameterString);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function Validation_validateProtocol(protocolString) {
|
|
70
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/protocol_schema.json", protocolString);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function Validation_validatePublication(publicationString) {
|
|
74
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/publication_schema.json", publicationString);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function Validation_validateSample(sampleString) {
|
|
78
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/sample_schema.json", sampleString);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function Validation_validateSource(sourceString) {
|
|
82
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/source_schema.json", sourceString);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function Validation_validateStudy(studyString) {
|
|
86
|
+
return Validation_validate("https://raw.githubusercontent.com/HLWeil/isa-specs/anyof/source/_static/isajson/study_schema.json", studyString);
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Union } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { union_type, array_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
3
|
+
|
|
4
|
+
export class ValidationResult extends Union {
|
|
5
|
+
constructor(tag, fields) {
|
|
6
|
+
super();
|
|
7
|
+
this.tag = tag;
|
|
8
|
+
this.fields = fields;
|
|
9
|
+
}
|
|
10
|
+
cases() {
|
|
11
|
+
return ["Ok", "Failed"];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function ValidationResult_$reflection() {
|
|
16
|
+
return union_type("ARCtrl.ISA.Json.ValidationTypes.ValidationResult", [], ValidationResult, () => [[], [["Item", array_type(string_type)]]]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function ValidationResult__get_Success(this$) {
|
|
20
|
+
if (this$.tag === 0) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function ValidationResult__GetErrors(this$) {
|
|
29
|
+
if (this$.tag === 1) {
|
|
30
|
+
return this$.fields[0];
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function ValidationResult_OfJSchemaOutput_Z6EC48F6B(output) {
|
|
38
|
+
if (output[0]) {
|
|
39
|
+
return new ValidationResult(0, []);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return new ValidationResult(1, [output[1]]);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { iterateIndexed, length, sortBy, collect, toArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
2
|
+
import { tryParseReferenceColumnHeader } from "../../ISA/Regex.js";
|
|
3
|
+
import { map as map_1, toList, tryFind } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
4
|
+
import { toFsColumns, fixDeprecatedIOHeader, fromFsColumns } from "./CompositeColumn.js";
|
|
5
|
+
import { ArcTable } from "../../ISA/ArcTypes/ArcTable.js";
|
|
6
|
+
import { FsWorksheet } from "../../../fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js";
|
|
7
|
+
import { comparePrimitives } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
8
|
+
import { FsRangeAddress_$ctor_7E77A4A0 } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js";
|
|
9
|
+
import { FsAddress_$ctor_Z37302880 } from "../../../fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js";
|
|
10
|
+
import { Dictionary_tryGet } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js";
|
|
11
|
+
import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
12
|
+
import { FsRangeBase__Cell_Z3407A44B } from "../../../fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Iterates over elements of the input list and groups adjacent elements.
|
|
16
|
+
* A new group is started when the specified predicate holds about the element
|
|
17
|
+
* of the list (and at the beginning of the iteration).
|
|
18
|
+
*
|
|
19
|
+
* For example:
|
|
20
|
+
* List.groupWhen isOdd [3;3;2;4;1;2] = [[3]; [3; 2; 4]; [1; 2]]
|
|
21
|
+
*/
|
|
22
|
+
export function Aux_List_groupWhen(f, list) {
|
|
23
|
+
return reverse(map(reverse, fold((acc, e) => {
|
|
24
|
+
const matchValue = f(e);
|
|
25
|
+
if (matchValue) {
|
|
26
|
+
return cons(singleton(e), acc);
|
|
27
|
+
}
|
|
28
|
+
else if (!isEmpty(acc)) {
|
|
29
|
+
return cons(cons(e, head(acc)), tail(acc));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return singleton(singleton(e));
|
|
33
|
+
}
|
|
34
|
+
}, empty(), list)));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function classifyHeaderOrder(header) {
|
|
38
|
+
switch (header.tag) {
|
|
39
|
+
case 4:
|
|
40
|
+
case 5:
|
|
41
|
+
case 6:
|
|
42
|
+
case 7:
|
|
43
|
+
case 8:
|
|
44
|
+
case 9:
|
|
45
|
+
case 10:
|
|
46
|
+
return 2;
|
|
47
|
+
case 0:
|
|
48
|
+
case 1:
|
|
49
|
+
case 2:
|
|
50
|
+
case 3:
|
|
51
|
+
case 13:
|
|
52
|
+
return 3;
|
|
53
|
+
case 12:
|
|
54
|
+
return 4;
|
|
55
|
+
default:
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function classifyColumnOrder(column) {
|
|
61
|
+
return classifyHeaderOrder(column.Header);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function groupColumnsByHeader(columns) {
|
|
65
|
+
return Aux_List_groupWhen((c) => {
|
|
66
|
+
if (tryParseReferenceColumnHeader(c.Item(1).Value) == null) {
|
|
67
|
+
return !(c.Item(1).Value.indexOf("Unit") === 0);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}, columns);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Returns the annotation table of the worksheet if it exists, else returns None
|
|
77
|
+
*/
|
|
78
|
+
export function tryAnnotationTable(sheet) {
|
|
79
|
+
return tryFind((t) => (t.Name.indexOf("annotationTable") === 0), sheet.Tables);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Groups and parses a collection of single columns into the according ISA composite columns
|
|
84
|
+
*/
|
|
85
|
+
export function composeColumns(columns) {
|
|
86
|
+
return toArray(map(fromFsColumns, groupColumnsByHeader(toList(columns))));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns the protocol described by the headers and a function for parsing the values of the matrix to the processes of this protocol
|
|
91
|
+
*/
|
|
92
|
+
export function tryFromFsWorksheet(sheet) {
|
|
93
|
+
const matchValue = tryAnnotationTable(sheet);
|
|
94
|
+
if (matchValue == null) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const t = matchValue;
|
|
99
|
+
const compositeColumns = composeColumns(map_1(fixDeprecatedIOHeader, t.GetColumns(sheet.CellCollection)));
|
|
100
|
+
return ArcTable.addColumns(compositeColumns)(ArcTable.init(sheet.Name));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function toFsWorksheet(table) {
|
|
105
|
+
const stringCount = new Map([]);
|
|
106
|
+
const ws = new FsWorksheet(table.Name);
|
|
107
|
+
const columns = collect(toFsColumns, sortBy(classifyColumnOrder, table.Columns, {
|
|
108
|
+
Compare: comparePrimitives,
|
|
109
|
+
}));
|
|
110
|
+
const maxRow = length(head(columns)) | 0;
|
|
111
|
+
const maxCol = length(columns) | 0;
|
|
112
|
+
const fsTable = ws.Table("annotationTable", FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(maxRow, maxCol)));
|
|
113
|
+
iterateIndexed((colI, col) => {
|
|
114
|
+
iterateIndexed((rowI, cell) => {
|
|
115
|
+
let value;
|
|
116
|
+
if (rowI === 0) {
|
|
117
|
+
const matchValue = Dictionary_tryGet(cell.Value, stringCount);
|
|
118
|
+
if (matchValue == null) {
|
|
119
|
+
addToDict(stringCount, cell.Value, "");
|
|
120
|
+
value = cell.Value;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
const spaces = matchValue;
|
|
124
|
+
stringCount.set(cell.Value, spaces + " ");
|
|
125
|
+
value = ((cell.Value + " ") + spaces);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
value = cell.Value;
|
|
130
|
+
}
|
|
131
|
+
const address = FsAddress_$ctor_Z37302880(rowI + 1, colI + 1);
|
|
132
|
+
FsRangeBase__Cell_Z3407A44B(fsTable, address, ws.CellCollection).SetValueAs(value);
|
|
133
|
+
}, col);
|
|
134
|
+
}, columns);
|
|
135
|
+
return ws;
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { singleton, ofArray, head, tail, isEmpty, map } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
2
|
+
import { CompositeCell } from "../../ISA/ArcTypes/CompositeCell.js";
|
|
3
|
+
import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
|
|
4
|
+
import { FsCell } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js";
|
|
5
|
+
|
|
6
|
+
export function fromFsCells(cells) {
|
|
7
|
+
const cellValues = map((c) => c.Value, cells);
|
|
8
|
+
let matchResult, v, v1, v2, v3, v1_1, v2_1, v3_1, v4;
|
|
9
|
+
if (!isEmpty(cellValues)) {
|
|
10
|
+
if (!isEmpty(tail(cellValues))) {
|
|
11
|
+
if (!isEmpty(tail(tail(cellValues)))) {
|
|
12
|
+
if (!isEmpty(tail(tail(tail(cellValues))))) {
|
|
13
|
+
if (isEmpty(tail(tail(tail(tail(cellValues)))))) {
|
|
14
|
+
matchResult = 2;
|
|
15
|
+
v1_1 = head(cellValues);
|
|
16
|
+
v2_1 = head(tail(cellValues));
|
|
17
|
+
v3_1 = head(tail(tail(cellValues)));
|
|
18
|
+
v4 = head(tail(tail(tail(cellValues))));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
matchResult = 3;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
matchResult = 1;
|
|
26
|
+
v1 = head(cellValues);
|
|
27
|
+
v2 = head(tail(cellValues));
|
|
28
|
+
v3 = head(tail(tail(cellValues)));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
matchResult = 3;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
matchResult = 0;
|
|
37
|
+
v = head(cellValues);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
matchResult = 3;
|
|
42
|
+
}
|
|
43
|
+
switch (matchResult) {
|
|
44
|
+
case 0:
|
|
45
|
+
return CompositeCell.createFreeText(v);
|
|
46
|
+
case 1:
|
|
47
|
+
return CompositeCell.createTermFromString(v1, v2, v3);
|
|
48
|
+
case 2:
|
|
49
|
+
return CompositeCell.createUnitizedFromString(v1_1, v2_1, v3_1, v4);
|
|
50
|
+
default:
|
|
51
|
+
return toFail(printf("Dafuq"));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function toFsCells(isTerm, hasUnit, cell) {
|
|
56
|
+
switch (cell.tag) {
|
|
57
|
+
case 0:
|
|
58
|
+
if (hasUnit) {
|
|
59
|
+
return ofArray([new FsCell(cell.fields[0].NameText), new FsCell(""), new FsCell(cell.fields[0].TermSourceREFString), new FsCell(cell.fields[0].TermAccessionOntobeeUrl)]);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return ofArray([new FsCell(cell.fields[0].NameText), new FsCell(cell.fields[0].TermSourceREFString), new FsCell(cell.fields[0].TermAccessionOntobeeUrl)]);
|
|
63
|
+
}
|
|
64
|
+
case 2:
|
|
65
|
+
return ofArray([new FsCell(cell.fields[0]), new FsCell(cell.fields[1].NameText), new FsCell(cell.fields[1].TermSourceREFString), new FsCell(cell.fields[1].TermAccessionOntobeeUrl)]);
|
|
66
|
+
default:
|
|
67
|
+
if (hasUnit) {
|
|
68
|
+
return ofArray([new FsCell(cell.fields[0]), new FsCell(""), new FsCell(""), new FsCell("")]);
|
|
69
|
+
}
|
|
70
|
+
else if (isTerm) {
|
|
71
|
+
return ofArray([new FsCell(cell.fields[0]), new FsCell(""), new FsCell("")]);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return singleton(new FsCell(cell.fields[0]));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|