@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,620 @@
|
|
|
1
|
+
import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { getRecordFields, makeRecord, record_type, list_type, option_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
3
|
+
import { OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
|
|
4
|
+
import { Data_$reflection } from "./Data.js";
|
|
5
|
+
import { AssayMaterials_get_empty, AssayMaterials_make, AssayMaterials_$reflection } from "./AssayMaterials.js";
|
|
6
|
+
import { MaterialAttribute_$reflection } from "./MaterialAttribute.js";
|
|
7
|
+
import { Process_$reflection } from "./Process.js";
|
|
8
|
+
import { Comment$_$reflection } from "./Comment.js";
|
|
9
|
+
import { empty, filter, map, singleton, append, exists, tryFind } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
10
|
+
import { safeHash, structuralHash, equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
11
|
+
import { map2 as map2_2 } from "../../../fable_modules/fable-library.4.1.4/Array.js";
|
|
12
|
+
import { Dict_tryFind, Dict_ofSeqWithMerge, Update_updateOnlyByExistingAppend, Update_updateOnlyByExisting, Update_updateAppend } from "../Helper.js";
|
|
13
|
+
import { Option_fromValueWithDefault, Update_UpdateOptions, Option_mapDefault } from "../Helper.js";
|
|
14
|
+
import { updateProtocols, getProtocols, getFactors, getOutputsWithFactorBy, getOutputsWithCharacteristicBy, getInputsWithCharacteristicBy, getParameters, getOutputsWithParameterBy, getInputsWithParameterBy, getMaterials, getSamples, getSources, getCharacteristics, getUnits, getData } from "./ProcessSequence.js";
|
|
15
|
+
import { map as map_1, defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
16
|
+
import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
|
|
17
|
+
import { Sample_$reflection } from "./Sample.js";
|
|
18
|
+
import { Material_$reflection } from "./Material.js";
|
|
19
|
+
import { toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
|
|
20
|
+
|
|
21
|
+
export class Assay extends Record {
|
|
22
|
+
constructor(ID, FileName, MeasurementType, TechnologyType, TechnologyPlatform, DataFiles, Materials, CharacteristicCategories, UnitCategories, ProcessSequence, Comments) {
|
|
23
|
+
super();
|
|
24
|
+
this.ID = ID;
|
|
25
|
+
this.FileName = FileName;
|
|
26
|
+
this.MeasurementType = MeasurementType;
|
|
27
|
+
this.TechnologyType = TechnologyType;
|
|
28
|
+
this.TechnologyPlatform = TechnologyPlatform;
|
|
29
|
+
this.DataFiles = DataFiles;
|
|
30
|
+
this.Materials = Materials;
|
|
31
|
+
this.CharacteristicCategories = CharacteristicCategories;
|
|
32
|
+
this.UnitCategories = UnitCategories;
|
|
33
|
+
this.ProcessSequence = ProcessSequence;
|
|
34
|
+
this.Comments = Comments;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function Assay_$reflection() {
|
|
39
|
+
return record_type("ARCtrl.ISA.Assay", [], Assay, () => [["ID", option_type(string_type)], ["FileName", option_type(string_type)], ["MeasurementType", option_type(OntologyAnnotation_$reflection())], ["TechnologyType", option_type(OntologyAnnotation_$reflection())], ["TechnologyPlatform", option_type(string_type)], ["DataFiles", option_type(list_type(Data_$reflection()))], ["Materials", option_type(AssayMaterials_$reflection())], ["CharacteristicCategories", option_type(list_type(MaterialAttribute_$reflection()))], ["UnitCategories", option_type(list_type(OntologyAnnotation_$reflection()))], ["ProcessSequence", option_type(list_type(Process_$reflection()))], ["Comments", option_type(list_type(Comment$_$reflection()))]]);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function Assay_make(id, fileName, measurementType, technologyType, technologyPlatform, dataFiles, materials, characteristicCategories, unitCategories, processSequence, comments) {
|
|
43
|
+
return new Assay(id, fileName, measurementType, technologyType, technologyPlatform, dataFiles, materials, characteristicCategories, unitCategories, processSequence, comments);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function Assay_create_3D372A24(Id, FileName, MeasurementType, TechnologyType, TechnologyPlatform, DataFiles, Materials, CharacteristicCategories, UnitCategories, ProcessSequence, Comments) {
|
|
47
|
+
return Assay_make(Id, FileName, MeasurementType, TechnologyType, TechnologyPlatform, DataFiles, Materials, CharacteristicCategories, UnitCategories, ProcessSequence, Comments);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function Assay_get_empty() {
|
|
51
|
+
return Assay_create_3D372A24();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* If an assay with the given identfier exists in the list, returns it
|
|
56
|
+
*/
|
|
57
|
+
export function Assay_tryGetByFileName(fileName, assays) {
|
|
58
|
+
return tryFind((a) => equals(a.FileName, fileName), assays);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* If an assay with the given identfier exists in the list, returns true
|
|
63
|
+
*/
|
|
64
|
+
export function Assay_existsByFileName(fileName, assays) {
|
|
65
|
+
return exists((a) => equals(a.FileName, fileName), assays);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Adds the given assay to the assays
|
|
70
|
+
*/
|
|
71
|
+
export function Assay_add(assays, assay) {
|
|
72
|
+
return append(assays, singleton(assay));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Updates all assays for which the predicate returns true with the given assays values
|
|
77
|
+
*/
|
|
78
|
+
export function Assay_updateBy(predicate, updateOption, assay, assays) {
|
|
79
|
+
if (exists(predicate, assays)) {
|
|
80
|
+
return map((a) => {
|
|
81
|
+
if (predicate(a)) {
|
|
82
|
+
const this$ = updateOption;
|
|
83
|
+
const recordType_1 = a;
|
|
84
|
+
const recordType_2 = assay;
|
|
85
|
+
switch (this$.tag) {
|
|
86
|
+
case 2:
|
|
87
|
+
return makeRecord(Assay_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
88
|
+
case 1:
|
|
89
|
+
return makeRecord(Assay_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
90
|
+
case 3:
|
|
91
|
+
return makeRecord(Assay_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
92
|
+
default:
|
|
93
|
+
return recordType_2;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
return a;
|
|
98
|
+
}
|
|
99
|
+
}, assays);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return assays;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* If an assay with the same fileName as the given assay exists in the study exists, updates it with the given assay values
|
|
108
|
+
*/
|
|
109
|
+
export function Assay_updateByFileName(updateOption, assay, assays) {
|
|
110
|
+
return Assay_updateBy((a) => equals(a.FileName, assay.FileName), updateOption, assay, assays);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Updates all assays with the same name as the given assay with its values
|
|
115
|
+
*/
|
|
116
|
+
export function Assay_removeByFileName(fileName, assays) {
|
|
117
|
+
return filter((a) => !equals(a.FileName, fileName), assays);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Returns comments of an assay
|
|
122
|
+
*/
|
|
123
|
+
export function Assay_getComments_722A269D(assay) {
|
|
124
|
+
return assay.Comments;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Applies function f on comments of an assay
|
|
129
|
+
*/
|
|
130
|
+
export function Assay_mapComments(f, assay) {
|
|
131
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, Option_mapDefault(empty(), f, assay.Comments));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Replaces comments of an assay by given comment list
|
|
136
|
+
*/
|
|
137
|
+
export function Assay_setComments(assay, comments) {
|
|
138
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, comments);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Returns data files of an assay
|
|
143
|
+
*/
|
|
144
|
+
export function Assay_getData_722A269D(assay) {
|
|
145
|
+
const processSequenceData = getData(defaultArg(assay.ProcessSequence, empty()));
|
|
146
|
+
const updateOptions = new Update_UpdateOptions(3, []);
|
|
147
|
+
const mapping = (d) => d.Name;
|
|
148
|
+
const list1 = defaultArg(assay.DataFiles, empty());
|
|
149
|
+
const list2 = processSequenceData;
|
|
150
|
+
try {
|
|
151
|
+
const map1 = Dict_ofSeqWithMerge((arg, arg_1) => {
|
|
152
|
+
const this$ = updateOptions;
|
|
153
|
+
const recordType_1 = arg;
|
|
154
|
+
const recordType_2 = arg_1;
|
|
155
|
+
switch (this$.tag) {
|
|
156
|
+
case 2:
|
|
157
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
158
|
+
case 1:
|
|
159
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
160
|
+
case 3:
|
|
161
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
162
|
+
default:
|
|
163
|
+
return recordType_2;
|
|
164
|
+
}
|
|
165
|
+
}, map((v) => [mapping(v), v], list1));
|
|
166
|
+
const map2 = Dict_ofSeqWithMerge((arg_2, arg_3) => {
|
|
167
|
+
const this$_1 = updateOptions;
|
|
168
|
+
const recordType_1_1 = arg_2;
|
|
169
|
+
const recordType_2_1 = arg_3;
|
|
170
|
+
switch (this$_1.tag) {
|
|
171
|
+
case 2:
|
|
172
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
173
|
+
case 1:
|
|
174
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
175
|
+
case 3:
|
|
176
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
177
|
+
default:
|
|
178
|
+
return recordType_2_1;
|
|
179
|
+
}
|
|
180
|
+
}, map((v_1) => [mapping(v_1), v_1], list2));
|
|
181
|
+
return map((k) => {
|
|
182
|
+
const matchValue = Dict_tryFind(k, map1);
|
|
183
|
+
const matchValue_1 = Dict_tryFind(k, map2);
|
|
184
|
+
if (matchValue == null) {
|
|
185
|
+
if (matchValue_1 == null) {
|
|
186
|
+
throw new Error("If this fails, then I don\'t know how to program");
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const v2_1 = matchValue_1;
|
|
190
|
+
return v2_1;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else if (matchValue_1 == null) {
|
|
194
|
+
const v1_1 = matchValue;
|
|
195
|
+
return v1_1;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const v1 = matchValue;
|
|
199
|
+
const v2 = matchValue_1;
|
|
200
|
+
const this$_2 = updateOptions;
|
|
201
|
+
const recordType_1_2 = v1;
|
|
202
|
+
const recordType_2_2 = v2;
|
|
203
|
+
switch (this$_2.tag) {
|
|
204
|
+
case 2:
|
|
205
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
206
|
+
case 1:
|
|
207
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
208
|
+
case 3:
|
|
209
|
+
return makeRecord(Data_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
210
|
+
default:
|
|
211
|
+
return recordType_2_2;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}, List_distinct(append(map(mapping, list1), map(mapping, list2)), {
|
|
215
|
+
Equals: equals,
|
|
216
|
+
GetHashCode: structuralHash,
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
throw new Error(`Could not mergeUpdate ${"Data"} list:
|
|
221
|
+
${err.message}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Applies function f on data files of an assay
|
|
227
|
+
*/
|
|
228
|
+
export function Assay_mapData(f, assay) {
|
|
229
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, Option_mapDefault(empty(), f, assay.DataFiles), assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Replaces data files of an assay by given data file list
|
|
234
|
+
*/
|
|
235
|
+
export function Assay_setData(assay, dataFiles) {
|
|
236
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, dataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Returns unit categories of an assay
|
|
241
|
+
*/
|
|
242
|
+
export function Assay_getUnitCategories_722A269D(assay) {
|
|
243
|
+
return List_distinct(append(getUnits(defaultArg(assay.ProcessSequence, empty())), defaultArg(assay.UnitCategories, empty())), {
|
|
244
|
+
Equals: equals,
|
|
245
|
+
GetHashCode: safeHash,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Applies function f on unit categories of an assay
|
|
251
|
+
*/
|
|
252
|
+
export function Assay_mapUnitCategories(f, assay) {
|
|
253
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, Option_mapDefault(empty(), f, assay.UnitCategories), assay.ProcessSequence, assay.Comments);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Replaces unit categories of an assay by given unit categorie list
|
|
258
|
+
*/
|
|
259
|
+
export function Assay_setUnitCategories(assay, unitCategories) {
|
|
260
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, unitCategories, assay.ProcessSequence, assay.Comments);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Returns characteristic categories of an assay
|
|
265
|
+
*/
|
|
266
|
+
export function Assay_getCharacteristics_722A269D(assay) {
|
|
267
|
+
return List_distinct(append(getCharacteristics(defaultArg(assay.ProcessSequence, empty())), defaultArg(assay.CharacteristicCategories, empty())), {
|
|
268
|
+
Equals: equals,
|
|
269
|
+
GetHashCode: safeHash,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Applies function f on characteristic categories of an assay
|
|
275
|
+
*/
|
|
276
|
+
export function Assay_mapCharacteristics(f, assay) {
|
|
277
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, Option_mapDefault(empty(), f, assay.CharacteristicCategories), assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Replaces characteristic categories of an assay by given characteristic categorie list
|
|
282
|
+
*/
|
|
283
|
+
export function Assay_setCharacteristics(assay, characteristics) {
|
|
284
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, characteristics, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Returns measurement type of an assay
|
|
289
|
+
*/
|
|
290
|
+
export function Assay_getMeasurementType_722A269D(assay) {
|
|
291
|
+
return assay.MeasurementType;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Applies function f on measurement type of an assay
|
|
296
|
+
*/
|
|
297
|
+
export function Assay_mapMeasurementType(f, assay) {
|
|
298
|
+
return new Assay(assay.ID, assay.FileName, map_1(f, assay.MeasurementType), assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Replaces measurement type of an assay by given measurement type
|
|
303
|
+
*/
|
|
304
|
+
export function Assay_setMeasurementType(assay, measurementType) {
|
|
305
|
+
return new Assay(assay.ID, assay.FileName, measurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Returns technology type of an assay
|
|
310
|
+
*/
|
|
311
|
+
export function Assay_getTechnologyType_722A269D(assay) {
|
|
312
|
+
return assay.TechnologyType;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Applies function f on technology type of an assay
|
|
317
|
+
*/
|
|
318
|
+
export function Assay_mapTechnologyType(f, assay) {
|
|
319
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, map_1(f, assay.TechnologyType), assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Replaces technology type of an assay by given technology type
|
|
324
|
+
*/
|
|
325
|
+
export function Assay_setTechnologyType(assay, technologyType) {
|
|
326
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, technologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Returns processes of an assay
|
|
331
|
+
*/
|
|
332
|
+
export function Assay_getProcesses_722A269D(assay) {
|
|
333
|
+
return defaultArg(assay.ProcessSequence, empty());
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Applies function f on processes of an assay
|
|
338
|
+
*/
|
|
339
|
+
export function Assay_mapProcesses(f, assay) {
|
|
340
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, Option_mapDefault(empty(), f, assay.ProcessSequence), assay.Comments);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Replaces processes of an assay by given processe list
|
|
345
|
+
*/
|
|
346
|
+
export function Assay_setProcesses(assay, processes) {
|
|
347
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, assay.Materials, assay.CharacteristicCategories, assay.UnitCategories, processes, assay.Comments);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export function Assay_getSources_722A269D(assay) {
|
|
351
|
+
return getSources(Assay_getProcesses_722A269D(assay));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export function Assay_getSamples_722A269D(assay) {
|
|
355
|
+
return getSamples(Assay_getProcesses_722A269D(assay));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Returns materials of an assay
|
|
360
|
+
*/
|
|
361
|
+
export function Assay_getMaterials_722A269D(assay) {
|
|
362
|
+
const processSequenceMaterials = getMaterials(defaultArg(assay.ProcessSequence, empty()));
|
|
363
|
+
const processSequenceSamples = getSamples(defaultArg(assay.ProcessSequence, empty()));
|
|
364
|
+
const matchValue = assay.Materials;
|
|
365
|
+
if (matchValue == null) {
|
|
366
|
+
return AssayMaterials_make(Option_fromValueWithDefault(empty(), processSequenceSamples), Option_fromValueWithDefault(empty(), processSequenceMaterials));
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
const mat = matchValue;
|
|
370
|
+
let samples;
|
|
371
|
+
const updateOptions = new Update_UpdateOptions(3, []);
|
|
372
|
+
const mapping = (s) => s.Name;
|
|
373
|
+
const list1 = defaultArg(mat.Samples, empty());
|
|
374
|
+
const list2 = processSequenceSamples;
|
|
375
|
+
try {
|
|
376
|
+
const map1 = Dict_ofSeqWithMerge((arg, arg_1) => {
|
|
377
|
+
const this$ = updateOptions;
|
|
378
|
+
const recordType_1 = arg;
|
|
379
|
+
const recordType_2 = arg_1;
|
|
380
|
+
switch (this$.tag) {
|
|
381
|
+
case 2:
|
|
382
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
383
|
+
case 1:
|
|
384
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
385
|
+
case 3:
|
|
386
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
|
|
387
|
+
default:
|
|
388
|
+
return recordType_2;
|
|
389
|
+
}
|
|
390
|
+
}, map((v) => [mapping(v), v], list1));
|
|
391
|
+
const map2 = Dict_ofSeqWithMerge((arg_2, arg_3) => {
|
|
392
|
+
const this$_1 = updateOptions;
|
|
393
|
+
const recordType_1_1 = arg_2;
|
|
394
|
+
const recordType_2_1 = arg_3;
|
|
395
|
+
switch (this$_1.tag) {
|
|
396
|
+
case 2:
|
|
397
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
398
|
+
case 1:
|
|
399
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
400
|
+
case 3:
|
|
401
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
|
|
402
|
+
default:
|
|
403
|
+
return recordType_2_1;
|
|
404
|
+
}
|
|
405
|
+
}, map((v_1) => [mapping(v_1), v_1], list2));
|
|
406
|
+
samples = map((k) => {
|
|
407
|
+
const matchValue_1 = Dict_tryFind(k, map1);
|
|
408
|
+
const matchValue_1_1 = Dict_tryFind(k, map2);
|
|
409
|
+
if (matchValue_1 == null) {
|
|
410
|
+
if (matchValue_1_1 == null) {
|
|
411
|
+
throw new Error("If this fails, then I don\'t know how to program");
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
const v2_1 = matchValue_1_1;
|
|
415
|
+
return v2_1;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
else if (matchValue_1_1 == null) {
|
|
419
|
+
const v1_1 = matchValue_1;
|
|
420
|
+
return v1_1;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
const v1 = matchValue_1;
|
|
424
|
+
const v2 = matchValue_1_1;
|
|
425
|
+
const this$_2 = updateOptions;
|
|
426
|
+
const recordType_1_2 = v1;
|
|
427
|
+
const recordType_2_2 = v2;
|
|
428
|
+
switch (this$_2.tag) {
|
|
429
|
+
case 2:
|
|
430
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
431
|
+
case 1:
|
|
432
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
433
|
+
case 3:
|
|
434
|
+
return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
|
|
435
|
+
default:
|
|
436
|
+
return recordType_2_2;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}, List_distinct(append(map(mapping, list1), map(mapping, list2)), {
|
|
440
|
+
Equals: equals,
|
|
441
|
+
GetHashCode: structuralHash,
|
|
442
|
+
}));
|
|
443
|
+
}
|
|
444
|
+
catch (err) {
|
|
445
|
+
throw new Error(`Could not mergeUpdate ${"Sample"} list:
|
|
446
|
+
${err.message}`);
|
|
447
|
+
}
|
|
448
|
+
let materials;
|
|
449
|
+
const updateOptions_1 = new Update_UpdateOptions(3, []);
|
|
450
|
+
const mapping_5 = (m) => m.Name;
|
|
451
|
+
const list1_1 = defaultArg(mat.OtherMaterials, empty());
|
|
452
|
+
const list2_1 = processSequenceMaterials;
|
|
453
|
+
try {
|
|
454
|
+
const map1_1 = Dict_ofSeqWithMerge((arg_6, arg_1_1) => {
|
|
455
|
+
const this$_3 = updateOptions_1;
|
|
456
|
+
const recordType_1_3 = arg_6;
|
|
457
|
+
const recordType_2_3 = arg_1_1;
|
|
458
|
+
switch (this$_3.tag) {
|
|
459
|
+
case 2:
|
|
460
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
|
|
461
|
+
case 1:
|
|
462
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
|
|
463
|
+
case 3:
|
|
464
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
|
|
465
|
+
default:
|
|
466
|
+
return recordType_2_3;
|
|
467
|
+
}
|
|
468
|
+
}, map((v_2) => [mapping_5(v_2), v_2], list1_1));
|
|
469
|
+
const map2_1 = Dict_ofSeqWithMerge((arg_2_1, arg_3_1) => {
|
|
470
|
+
const this$_4 = updateOptions_1;
|
|
471
|
+
const recordType_1_4 = arg_2_1;
|
|
472
|
+
const recordType_2_4 = arg_3_1;
|
|
473
|
+
switch (this$_4.tag) {
|
|
474
|
+
case 2:
|
|
475
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
|
|
476
|
+
case 1:
|
|
477
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
|
|
478
|
+
case 3:
|
|
479
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
|
|
480
|
+
default:
|
|
481
|
+
return recordType_2_4;
|
|
482
|
+
}
|
|
483
|
+
}, map((v_1_1) => [mapping_5(v_1_1), v_1_1], list2_1));
|
|
484
|
+
materials = map((k_1) => {
|
|
485
|
+
const matchValue_3 = Dict_tryFind(k_1, map1_1);
|
|
486
|
+
const matchValue_1_2 = Dict_tryFind(k_1, map2_1);
|
|
487
|
+
if (matchValue_3 == null) {
|
|
488
|
+
if (matchValue_1_2 == null) {
|
|
489
|
+
throw new Error("If this fails, then I don\'t know how to program");
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
const v2_1_1 = matchValue_1_2;
|
|
493
|
+
return v2_1_1;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
else if (matchValue_1_2 == null) {
|
|
497
|
+
const v1_1_1 = matchValue_3;
|
|
498
|
+
return v1_1_1;
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
const v1_2 = matchValue_3;
|
|
502
|
+
const v2_2 = matchValue_1_2;
|
|
503
|
+
const this$_5 = updateOptions_1;
|
|
504
|
+
const recordType_1_5 = v1_2;
|
|
505
|
+
const recordType_2_5 = v2_2;
|
|
506
|
+
switch (this$_5.tag) {
|
|
507
|
+
case 2:
|
|
508
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
|
|
509
|
+
case 1:
|
|
510
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
|
|
511
|
+
case 3:
|
|
512
|
+
return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
|
|
513
|
+
default:
|
|
514
|
+
return recordType_2_5;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}, List_distinct(append(map(mapping_5, list1_1), map(mapping_5, list2_1)), {
|
|
518
|
+
Equals: equals,
|
|
519
|
+
GetHashCode: structuralHash,
|
|
520
|
+
}));
|
|
521
|
+
}
|
|
522
|
+
catch (err_1) {
|
|
523
|
+
throw new Error(`Could not mergeUpdate ${"Material"} list:
|
|
524
|
+
${err_1.message}`);
|
|
525
|
+
}
|
|
526
|
+
return AssayMaterials_make(Option_fromValueWithDefault(empty(), samples), Option_fromValueWithDefault(empty(), materials));
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Applies function f on materials of an assay
|
|
532
|
+
*/
|
|
533
|
+
export function Assay_mapMaterials(f, assay) {
|
|
534
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, map_1(f, assay.Materials), assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Replaces materials of an assay by given assay materials
|
|
539
|
+
*/
|
|
540
|
+
export function Assay_setMaterials(assay, materials) {
|
|
541
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, assay.DataFiles, materials, assay.CharacteristicCategories, assay.UnitCategories, assay.ProcessSequence, assay.Comments);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* If the assay contains a process implementing the given parameter, return the list of input files together with their according parameter values of this parameter
|
|
546
|
+
*/
|
|
547
|
+
export function Assay_getInputsWithParameterBy(predicate, assay) {
|
|
548
|
+
return map_1((processSequence) => getInputsWithParameterBy(predicate, processSequence), assay.ProcessSequence);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* If the assay contains a process implementing the given parameter, return the list of output files together with their according parameter values of this parameter
|
|
553
|
+
*/
|
|
554
|
+
export function Assay_getOutputsWithParameterBy(predicate, assay) {
|
|
555
|
+
return map_1((processSequence) => getOutputsWithParameterBy(predicate, processSequence), assay.ProcessSequence);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Returns the parameters implemented by the processes contained in this assay
|
|
560
|
+
*/
|
|
561
|
+
export function Assay_getParameters_722A269D(assay) {
|
|
562
|
+
return map_1(getParameters, assay.ProcessSequence);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* If the assay contains a process implementing the given parameter, return the list of input files together with their according parameter values of this parameter
|
|
567
|
+
*/
|
|
568
|
+
export function Assay_getInputsWithCharacteristicBy(predicate, assay) {
|
|
569
|
+
return map_1((processSequence) => getInputsWithCharacteristicBy(predicate, processSequence), assay.ProcessSequence);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* If the assay contains a process implementing the given parameter, return the list of output files together with their according parameter values of this parameter
|
|
574
|
+
*/
|
|
575
|
+
export function Assay_getOutputsWithCharacteristicBy(predicate, assay) {
|
|
576
|
+
return map_1((processSequence) => getOutputsWithCharacteristicBy(predicate, processSequence), assay.ProcessSequence);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* If the assay contains a process implementing the given factor, return the list of output files together with their according factor values of this factor
|
|
581
|
+
*/
|
|
582
|
+
export function Assay_getOutputsWithFactorBy(predicate, assay) {
|
|
583
|
+
return map_1((processSequence) => getOutputsWithFactorBy(predicate, processSequence), assay.ProcessSequence);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Returns the factors implemented by the processes contained in this assay
|
|
588
|
+
*/
|
|
589
|
+
export function Assay_getFactors_722A269D(assay) {
|
|
590
|
+
return getFactors(defaultArg(assay.ProcessSequence, empty()));
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Returns the protocols implemented by the processes contained in this assay
|
|
595
|
+
*/
|
|
596
|
+
export function Assay_getProtocols_722A269D(assay) {
|
|
597
|
+
return getProtocols(defaultArg(assay.ProcessSequence, empty()));
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export function Assay_update_722A269D(assay) {
|
|
601
|
+
let v_1;
|
|
602
|
+
try {
|
|
603
|
+
return new Assay(assay.ID, assay.FileName, assay.MeasurementType, assay.TechnologyType, assay.TechnologyPlatform, Option_fromValueWithDefault(empty(), Assay_getData_722A269D(assay)), (v_1 = Assay_getMaterials_722A269D(assay), Option_fromValueWithDefault(AssayMaterials_get_empty(), v_1)), Option_fromValueWithDefault(empty(), Assay_getCharacteristics_722A269D(assay)), Option_fromValueWithDefault(empty(), Assay_getUnitCategories_722A269D(assay)), assay.ProcessSequence, assay.Comments);
|
|
604
|
+
}
|
|
605
|
+
catch (err) {
|
|
606
|
+
return toFail(`Could not update assay ${assay.FileName}:
|
|
607
|
+
${err.message}`);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export function Assay_updateProtocols(protocols, assay) {
|
|
612
|
+
try {
|
|
613
|
+
return Assay_mapProcesses((processSequence) => updateProtocols(protocols, processSequence), assay);
|
|
614
|
+
}
|
|
615
|
+
catch (err) {
|
|
616
|
+
return toFail(`Could not update assay protocols ${assay.FileName}:
|
|
617
|
+
${err.message}`);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { Sample_$reflection } from "./Sample.js";
|
|
3
|
+
import { record_type, option_type, list_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
4
|
+
import { Material_$reflection } from "./Material.js";
|
|
5
|
+
import { defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
6
|
+
import { empty } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
7
|
+
|
|
8
|
+
export class AssayMaterials extends Record {
|
|
9
|
+
constructor(Samples, OtherMaterials) {
|
|
10
|
+
super();
|
|
11
|
+
this.Samples = Samples;
|
|
12
|
+
this.OtherMaterials = OtherMaterials;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function AssayMaterials_$reflection() {
|
|
17
|
+
return record_type("ARCtrl.ISA.AssayMaterials", [], AssayMaterials, () => [["Samples", option_type(list_type(Sample_$reflection()))], ["OtherMaterials", option_type(list_type(Material_$reflection()))]]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function AssayMaterials_make(samples, otherMaterials) {
|
|
21
|
+
return new AssayMaterials(samples, otherMaterials);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function AssayMaterials_create_Z253F0553(Samples, OtherMaterials) {
|
|
25
|
+
return AssayMaterials_make(Samples, OtherMaterials);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function AssayMaterials_get_empty() {
|
|
29
|
+
return AssayMaterials_create_Z253F0553();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function AssayMaterials_getMaterials_35E61745(am) {
|
|
33
|
+
return defaultArg(am.OtherMaterials, empty());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function AssayMaterials_getSamples_35E61745(am) {
|
|
37
|
+
return defaultArg(am.Samples, empty());
|
|
38
|
+
}
|
|
39
|
+
|