@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.
Files changed (277) hide show
  1. package/ARCtrl.js +257 -0
  2. package/Contract/Contract.js +95 -0
  3. package/Contracts/Contracts.ARCtrl.js +35 -0
  4. package/Contracts/Contracts.ArcAssay.js +65 -0
  5. package/Contracts/Contracts.ArcInvestigation.js +58 -0
  6. package/Contracts/Contracts.ArcStudy.js +65 -0
  7. package/Contracts/Contracts.Git.js +91 -0
  8. package/FileSystem/Commit.js +18 -0
  9. package/FileSystem/DefaultGitignore.js +3 -0
  10. package/FileSystem/FileSystem.js +53 -0
  11. package/FileSystem/FileSystemTree.js +223 -0
  12. package/FileSystem/Path.js +38 -0
  13. package/FileSystemTree.js +51 -0
  14. package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
  21. package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
  22. package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
  23. package/ISA/ISA/Builder/Types.js +243 -0
  24. package/ISA/ISA/Fable.js +50 -0
  25. package/ISA/ISA/Helper.js +326 -0
  26. package/ISA/ISA/Identifier.js +76 -0
  27. package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
  28. package/ISA/ISA/JsonTypes/Assay.js +620 -0
  29. package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
  30. package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
  31. package/ISA/ISA/JsonTypes/Comment.js +58 -0
  32. package/ISA/ISA/JsonTypes/CommentList.js +139 -0
  33. package/ISA/ISA/JsonTypes/Component.js +158 -0
  34. package/ISA/ISA/JsonTypes/Data.js +55 -0
  35. package/ISA/ISA/JsonTypes/DataFile.js +68 -0
  36. package/ISA/ISA/JsonTypes/Factor.js +128 -0
  37. package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
  38. package/ISA/ISA/JsonTypes/Investigation.js +204 -0
  39. package/ISA/ISA/JsonTypes/Material.js +66 -0
  40. package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
  41. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
  42. package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
  43. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
  44. package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
  45. package/ISA/ISA/JsonTypes/Person.js +137 -0
  46. package/ISA/ISA/JsonTypes/Process.js +401 -0
  47. package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
  48. package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
  49. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
  50. package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
  51. package/ISA/ISA/JsonTypes/Protocol.js +277 -0
  52. package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
  53. package/ISA/ISA/JsonTypes/Publication.js +105 -0
  54. package/ISA/ISA/JsonTypes/Sample.js +71 -0
  55. package/ISA/ISA/JsonTypes/Source.js +54 -0
  56. package/ISA/ISA/JsonTypes/Study.js +942 -0
  57. package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
  58. package/ISA/ISA/JsonTypes/URI.js +19 -0
  59. package/ISA/ISA/JsonTypes/Value.js +210 -0
  60. package/ISA/ISA/Regex.js +588 -0
  61. package/ISA/ISA.Json/Assay.js +123 -0
  62. package/ISA/ISA.Json/Comment.js +84 -0
  63. package/ISA/ISA.Json/ConverterOptions.js +33 -0
  64. package/ISA/ISA.Json/Data.js +271 -0
  65. package/ISA/ISA.Json/Decode.js +46 -0
  66. package/ISA/ISA.Json/Factor.js +194 -0
  67. package/ISA/ISA.Json/GEncode.js +15 -0
  68. package/ISA/ISA.Json/Investigation.js +132 -0
  69. package/ISA/ISA.Json/Material.js +233 -0
  70. package/ISA/ISA.Json/Ontology.js +204 -0
  71. package/ISA/ISA.Json/Person.js +204 -0
  72. package/ISA/ISA.Json/Process.js +291 -0
  73. package/ISA/ISA.Json/Protocol.js +242 -0
  74. package/ISA/ISA.Json/Publication.js +92 -0
  75. package/ISA/ISA.Json/Study.js +230 -0
  76. package/ISA/ISA.Json/Validation/Fable.js +69 -0
  77. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
  78. package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
  79. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
  80. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
  81. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  82. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
  83. package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
  84. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
  85. package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
  86. package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
  87. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
  88. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
  89. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
  90. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
  91. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
  92. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
  93. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
  94. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
  95. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
  96. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
  97. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
  98. package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
  99. package/README.md +277 -0
  100. package/SemVer.js +60 -0
  101. package/Templates/Templates.Json.js +40 -0
  102. package/Templates/Templates.Spreadsheet.js +315 -0
  103. package/Templates/Templates.js +179 -0
  104. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  105. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  106. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  107. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  108. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  109. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  110. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  111. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  112. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  113. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  114. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  115. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  116. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  117. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  118. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  119. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  120. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  121. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  163. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  164. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  165. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  166. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  167. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  168. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  169. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  170. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  171. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  172. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  173. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  174. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  175. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  176. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  177. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  178. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  179. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  180. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  181. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  182. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  183. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  184. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  185. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  186. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  187. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  188. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  189. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  190. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  191. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  192. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  193. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  194. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  195. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  196. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  197. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  198. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  199. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  200. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  201. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  202. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  203. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  204. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  205. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  206. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  207. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  208. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  209. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  210. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  211. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  212. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  213. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  214. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  215. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  216. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  217. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  219. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  220. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  221. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  222. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  223. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  224. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  225. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  226. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  227. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  228. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  229. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  230. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  231. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  232. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  233. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  234. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  235. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  236. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  237. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  238. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  239. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  240. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  241. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  242. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  243. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  244. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  245. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  246. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  247. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  248. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  249. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  250. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  251. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  252. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  253. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  254. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  255. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  256. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  257. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  258. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  259. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  260. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  261. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  262. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  263. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  264. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  265. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  266. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  267. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  268. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  269. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  270. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  271. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  272. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  273. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  274. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  275. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  276. package/fable_modules/project_cracked.json +1 -0
  277. package/package.json +22 -0
@@ -0,0 +1,104 @@
1
+ import { reverse, cons, iterateIndexed, empty, map, toArray, initialize, singleton, length, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { OntologyAnnotation_toAggregatedStrings, OntologyAnnotation_fromAggregatedStrings, Option_fromValueWithDefault } from "./Conversions.js";
3
+ import { Person } from "../../ISA/JsonTypes/Person.js";
4
+ import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
5
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
6
+ import { unwrap, defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
7
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
8
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
9
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
10
+
11
+ export const lastNameLabel = "Last Name";
12
+
13
+ export const firstNameLabel = "First Name";
14
+
15
+ export const midInitialsLabel = "Mid Initials";
16
+
17
+ export const emailLabel = "Email";
18
+
19
+ export const phoneLabel = "Phone";
20
+
21
+ export const faxLabel = "Fax";
22
+
23
+ export const addressLabel = "Address";
24
+
25
+ export const affiliationLabel = "Affiliation";
26
+
27
+ export const rolesLabel = "Roles";
28
+
29
+ export const rolesTermAccessionNumberLabel = "Roles Term Accession Number";
30
+
31
+ export const rolesTermSourceREFLabel = "Roles Term Source REF";
32
+
33
+ export const labels = ofArray([lastNameLabel, firstNameLabel, midInitialsLabel, emailLabel, phoneLabel, faxLabel, addressLabel, affiliationLabel, rolesLabel, rolesTermAccessionNumberLabel, rolesTermSourceREFLabel]);
34
+
35
+ export function fromString(lastName, firstName, midInitials, email, phone, fax, address, affiliation, role, rolesTermAccessionNumber, rolesTermSourceREF, comments) {
36
+ let arg_12;
37
+ const arg_10 = Option_fromValueWithDefault([], OntologyAnnotation_fromAggregatedStrings(";", role, rolesTermSourceREF, rolesTermAccessionNumber));
38
+ const arg_11 = Option_fromValueWithDefault([], comments);
39
+ arg_12 = Person.make(void 0, void 0, lastName, firstName, midInitials, email, phone, fax, address, affiliation, arg_10, arg_11);
40
+ return Person.setOrcidFromComments(arg_12);
41
+ }
42
+
43
+ export function fromSparseTable(matrix) {
44
+ if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
45
+ const comments = SparseTable_GetEmptyComments_651559CC(matrix);
46
+ return singleton(Person.create(void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, comments));
47
+ }
48
+ else {
49
+ return initialize(matrix.ColumnCount, (i) => {
50
+ const comments_1 = toArray(map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys));
51
+ return fromString(SparseTable__TryGetValue_11FD62A8(matrix, [lastNameLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [firstNameLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [midInitialsLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [emailLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [phoneLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [faxLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [addressLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [affiliationLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [rolesLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [rolesTermAccessionNumberLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [rolesTermSourceREFLabel, i]), comments_1);
52
+ });
53
+ }
54
+ }
55
+
56
+ export function toSparseTable(persons) {
57
+ const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, length(persons) + 1);
58
+ let commentKeys = empty();
59
+ iterateIndexed((i, p) => {
60
+ const i_1 = (i + 1) | 0;
61
+ const rAgg = OntologyAnnotation_toAggregatedStrings(";", defaultArg(p.Roles, []));
62
+ addToDict(matrix.Matrix, [lastNameLabel, i_1], defaultArg(p.LastName, ""));
63
+ addToDict(matrix.Matrix, [firstNameLabel, i_1], defaultArg(p.FirstName, ""));
64
+ addToDict(matrix.Matrix, [midInitialsLabel, i_1], defaultArg(p.MidInitials, ""));
65
+ addToDict(matrix.Matrix, [emailLabel, i_1], defaultArg(p.EMail, ""));
66
+ addToDict(matrix.Matrix, [phoneLabel, i_1], defaultArg(p.Phone, ""));
67
+ addToDict(matrix.Matrix, [faxLabel, i_1], defaultArg(p.Fax, ""));
68
+ addToDict(matrix.Matrix, [addressLabel, i_1], defaultArg(p.Address, ""));
69
+ addToDict(matrix.Matrix, [affiliationLabel, i_1], defaultArg(p.Affiliation, ""));
70
+ addToDict(matrix.Matrix, [rolesLabel, i_1], rAgg.TermNameAgg);
71
+ addToDict(matrix.Matrix, [rolesTermAccessionNumberLabel, i_1], rAgg.TermAccessionNumberAgg);
72
+ addToDict(matrix.Matrix, [rolesTermSourceREFLabel, i_1], rAgg.TermSourceREFAgg);
73
+ const matchValue = p.Comments;
74
+ if (matchValue != null) {
75
+ const array = matchValue;
76
+ array.forEach((comment) => {
77
+ const patternInput = Comment_toString(comment);
78
+ const n = patternInput[0];
79
+ commentKeys = cons(n, commentKeys);
80
+ addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
81
+ });
82
+ }
83
+ }, map((arg) => Person.setCommentFromORCID(arg), persons));
84
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
85
+ Equals: (x, y) => (x === y),
86
+ GetHashCode: stringHash,
87
+ })), matrix.ColumnCount);
88
+ }
89
+
90
+ export function fromRows(prefix, lineNumber, rows) {
91
+ const tupledArg = SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber, unwrap(prefix));
92
+ return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(tupledArg[3])];
93
+ }
94
+
95
+ export function toRows(prefix, persons) {
96
+ const m = toSparseTable(persons);
97
+ if (prefix == null) {
98
+ return SparseTable_ToRows_6A3D4534(m);
99
+ }
100
+ else {
101
+ return SparseTable_ToRows_6A3D4534(m, prefix);
102
+ }
103
+ }
104
+
@@ -0,0 +1,180 @@
1
+ import { equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
2
+ import { value, some } from "../../../fable_modules/fable-library.4.1.4/Option.js";
3
+ import { map, equalsWith, fill, map3, fold } from "../../../fable_modules/fable-library.4.1.4/Array.js";
4
+ import { toText, printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
5
+ import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
6
+ import { map as map_1, fold as fold_1, ofArray, empty } from "../../../fable_modules/fable-library.4.1.4/List.js";
7
+ import { Array_map4 } from "../CollectionAux.js";
8
+ import { Component_toString_Z609B8895, Component_fromString_Z61E08C1 } from "../../ISA/JsonTypes/Component.js";
9
+ import { ProtocolParameter_toString_Z3A4310A5, ProtocolParameter_make } from "../../ISA/JsonTypes/ProtocolParameter.js";
10
+
11
+ /**
12
+ * If the value matches the default, a None is returned, else a Some is returned
13
+ */
14
+ export function Option_fromValueWithDefault(d, v) {
15
+ if (equals(d, v)) {
16
+ return void 0;
17
+ }
18
+ else {
19
+ return some(v);
20
+ }
21
+ }
22
+
23
+ /**
24
+ * Applies the function f on the value of the option if it exists, else applies it on the default value. If the result value matches the default, a None is returned
25
+ */
26
+ export function Option_mapDefault(d, f, o) {
27
+ return Option_fromValueWithDefault(d, (o == null) ? f(d) : f(value(o)));
28
+ }
29
+
30
+ /**
31
+ * Returns the length of a subpropertylist from the aggregated strings
32
+ *
33
+ * In ISATab format, some subproperties which are stored as lists in ISAJson are stored as semicolon delimited tables
34
+ *
35
+ * These strings should either contain the same number of semicolon delimited elements or be empty.
36
+ */
37
+ export function OntologyAnnotation_getLengthOfAggregatedStrings(separator, strings) {
38
+ return fold((l, s) => {
39
+ if (s === "") {
40
+ return l | 0;
41
+ }
42
+ else if (l === 0) {
43
+ return s.split(separator).length | 0;
44
+ }
45
+ else if (l === s.split(separator).length) {
46
+ return l | 0;
47
+ }
48
+ else {
49
+ return toFail(printf("The length of the aggregated string %s does not match the length of the others"))(s) | 0;
50
+ }
51
+ }, 0, strings);
52
+ }
53
+
54
+ /**
55
+ * Returns a list of ISAJson OntologyAnnotation objects from ISATab aggregated strings
56
+ */
57
+ export function OntologyAnnotation_fromAggregatedStrings(separator, terms, source, accessions) {
58
+ const l = OntologyAnnotation_getLengthOfAggregatedStrings(separator, [terms, source, accessions]) | 0;
59
+ if (l === 0) {
60
+ return [];
61
+ }
62
+ else {
63
+ return map3((a, b, c) => OntologyAnnotation.fromString(a, b, c), (terms === "") ? fill(new Array(l), 0, l, "") : terms.split(separator), (source === "") ? fill(new Array(l), 0, l, "") : source.split(separator), (accessions === "") ? fill(new Array(l), 0, l, "") : accessions.split(separator));
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Returns the aggregated ISATab OntologyAnnotation Name, ontology source and Accession number from a list of ISAJson OntologyAnnotation objects
69
+ */
70
+ export function OntologyAnnotation_toAggregatedStrings(separator, oas) {
71
+ let first = true;
72
+ if (equalsWith(equals, oas, [])) {
73
+ return {
74
+ TermAccessionNumberAgg: "",
75
+ TermNameAgg: "",
76
+ TermSourceREFAgg: "",
77
+ };
78
+ }
79
+ else {
80
+ const tupledArg_1 = fold((tupledArg, term) => {
81
+ if (first) {
82
+ first = false;
83
+ return [term.TermName, term.TermSourceREF, term.TermAccessionNumber];
84
+ }
85
+ else {
86
+ return [toText(printf("%s%c%s"))(tupledArg[0])(separator)(term.TermName), toText(printf("%s%c%s"))(tupledArg[1])(separator)(term.TermSourceREF), toText(printf("%s%c%s"))(tupledArg[2])(separator)(term.TermAccessionNumber)];
87
+ }
88
+ }, ["", "", ""], map((arg) => OntologyAnnotation.toString(arg), oas));
89
+ return {
90
+ TermAccessionNumberAgg: tupledArg_1[2],
91
+ TermNameAgg: tupledArg_1[0],
92
+ TermSourceREFAgg: tupledArg_1[1],
93
+ };
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Returns a list of ISAJson Component objects from ISATab aggregated strings
99
+ */
100
+ export function Component_fromAggregatedStrings(separator, names, terms, source, accessions) {
101
+ const l = OntologyAnnotation_getLengthOfAggregatedStrings(separator, [names, terms, source, accessions]) | 0;
102
+ if (l === 0) {
103
+ return empty();
104
+ }
105
+ else {
106
+ return ofArray(Array_map4(Component_fromString_Z61E08C1, (names === "") ? fill(new Array(l), 0, l, "") : names.split(separator), (terms === "") ? fill(new Array(l), 0, l, "") : terms.split(separator), (source === "") ? fill(new Array(l), 0, l, "") : source.split(separator), (accessions === "") ? fill(new Array(l), 0, l, "") : accessions.split(separator)));
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Returns the aggregated ISATAb Component Name, Ontology Annotation value, Accession number and ontology source from a list of ISAJson Component objects
112
+ */
113
+ export function Component_toAggregatedStrings(separator, cs) {
114
+ let first = true;
115
+ if (equals(cs, empty())) {
116
+ return {
117
+ NameAgg: "",
118
+ TermAccessionNumberAgg: "",
119
+ TermNameAgg: "",
120
+ TermSourceREFAgg: "",
121
+ };
122
+ }
123
+ else {
124
+ const tupledArg_2 = fold_1((tupledArg, tupledArg_1) => {
125
+ const name = tupledArg_1[0];
126
+ const term = tupledArg_1[1];
127
+ if (first) {
128
+ first = false;
129
+ return [name, term.TermName, term.TermSourceREF, term.TermAccessionNumber];
130
+ }
131
+ else {
132
+ return [toText(printf("%s%c%s"))(tupledArg[0])(separator)(name), toText(printf("%s%c%s"))(tupledArg[1])(separator)(term.TermName), toText(printf("%s%c%s"))(tupledArg[2])(separator)(term.TermSourceREF), toText(printf("%s%c%s"))(tupledArg[3])(separator)(term.TermAccessionNumber)];
133
+ }
134
+ }, ["", "", "", ""], map_1(Component_toString_Z609B8895, cs));
135
+ return {
136
+ NameAgg: tupledArg_2[0],
137
+ TermAccessionNumberAgg: tupledArg_2[3],
138
+ TermNameAgg: tupledArg_2[1],
139
+ TermSourceREFAgg: tupledArg_2[2],
140
+ };
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Returns a list of ISAJson ProtocolParameter objects from ISATab aggregated strings
146
+ */
147
+ export function ProtocolParameter_fromAggregatedStrings(separator, terms, source, accessions) {
148
+ return map((arg_3) => ((arg_2) => ProtocolParameter_make(void 0, arg_2))(arg_3), OntologyAnnotation_fromAggregatedStrings(separator, terms, source, accessions));
149
+ }
150
+
151
+ /**
152
+ * Returns the aggregated ISATAb Ontology Annotation value, Accession number and ontology source from a list of ISAJson ProtocolParameter objects
153
+ */
154
+ export function ProtocolParameter_toAggregatedStrings(separator, oas) {
155
+ let first = true;
156
+ if (equals(oas, empty())) {
157
+ return {
158
+ TermAccessionNumberAgg: "",
159
+ TermNameAgg: "",
160
+ TermSourceREFAgg: "",
161
+ };
162
+ }
163
+ else {
164
+ const tupledArg_1 = fold_1((tupledArg, term) => {
165
+ if (first) {
166
+ first = false;
167
+ return [term.TermName, term.TermSourceREF, term.TermAccessionNumber];
168
+ }
169
+ else {
170
+ return [toText(printf("%s%c%s"))(tupledArg[0])(separator)(term.TermName), toText(printf("%s%c%s"))(tupledArg[1])(separator)(term.TermSourceREF), toText(printf("%s%c%s"))(tupledArg[2])(separator)(term.TermAccessionNumber)];
171
+ }
172
+ }, ["", "", ""], map_1(ProtocolParameter_toString_Z3A4310A5, oas));
173
+ return {
174
+ TermAccessionNumberAgg: tupledArg_1[2],
175
+ TermNameAgg: tupledArg_1[0],
176
+ TermSourceREFAgg: tupledArg_1[1],
177
+ };
178
+ }
179
+ }
180
+
@@ -0,0 +1,27 @@
1
+ import { ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { toRows as toRows_1, fromRows as fromRows_1, toSparseTable as toSparseTable_1, fromSparseTable as fromSparseTable_1 } from "./OntologyAnnotation.js";
3
+
4
+ export const designTypeLabel = "Type";
5
+
6
+ export const designTypeTermAccessionNumberLabel = "Type Term Accession Number";
7
+
8
+ export const designTypeTermSourceREFLabel = "Type Term Source REF";
9
+
10
+ export const labels = ofArray([designTypeLabel, designTypeTermAccessionNumberLabel, designTypeTermSourceREFLabel]);
11
+
12
+ export function fromSparseTable(matrix) {
13
+ return fromSparseTable_1(designTypeLabel, designTypeTermSourceREFLabel, designTypeTermAccessionNumberLabel, matrix);
14
+ }
15
+
16
+ export function toSparseTable(designs) {
17
+ return toSparseTable_1(designTypeLabel, designTypeTermSourceREFLabel, designTypeTermAccessionNumberLabel, designs);
18
+ }
19
+
20
+ export function fromRows(prefix, lineNumber, rows) {
21
+ return fromRows_1(prefix, designTypeLabel, designTypeTermSourceREFLabel, designTypeTermAccessionNumberLabel, lineNumber, rows);
22
+ }
23
+
24
+ export function toRows(prefix, designs) {
25
+ return toRows_1(prefix, designTypeLabel, designTypeTermSourceREFLabel, designTypeTermAccessionNumberLabel, designs);
26
+ }
27
+
@@ -0,0 +1,85 @@
1
+ import { reverse, cons, iterateIndexed, empty, map, toArray, initialize, singleton, length, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
3
+ import { Option_fromValueWithDefault } from "./Conversions.js";
4
+ import { Factor } from "../../ISA/JsonTypes/Factor.js";
5
+ import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
6
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
7
+ import { defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
8
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
9
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
10
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
11
+
12
+ export const nameLabel = "Name";
13
+
14
+ export const factorTypeLabel = "Type";
15
+
16
+ export const typeTermAccessionNumberLabel = "Type Term Accession Number";
17
+
18
+ export const typeTermSourceREFLabel = "Type Term Source REF";
19
+
20
+ export const labels = ofArray([nameLabel, factorTypeLabel, typeTermAccessionNumberLabel, typeTermSourceREFLabel]);
21
+
22
+ export function fromString(name, designType, typeTermSourceREF, typeTermAccessionNumber, comments) {
23
+ const factorType = OntologyAnnotation.fromString(designType, typeTermSourceREF, typeTermAccessionNumber);
24
+ const arg_2 = Option_fromValueWithDefault(OntologyAnnotation.empty, factorType);
25
+ const arg_3 = Option_fromValueWithDefault([], comments);
26
+ return Factor.make(void 0, name, arg_2, arg_3);
27
+ }
28
+
29
+ export function fromSparseTable(matrix) {
30
+ if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
31
+ const comments = SparseTable_GetEmptyComments_651559CC(matrix);
32
+ return singleton(Factor.create(void 0, void 0, void 0, comments));
33
+ }
34
+ else {
35
+ return initialize(matrix.ColumnCount, (i) => {
36
+ const comments_1 = toArray(map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys));
37
+ return fromString(SparseTable__TryGetValue_11FD62A8(matrix, [nameLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [factorTypeLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [typeTermSourceREFLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [typeTermAccessionNumberLabel, i]), comments_1);
38
+ });
39
+ }
40
+ }
41
+
42
+ export function toSparseTable(factors) {
43
+ const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, length(factors) + 1);
44
+ let commentKeys = empty();
45
+ iterateIndexed((i, f) => {
46
+ const i_1 = (i + 1) | 0;
47
+ let ft;
48
+ const f_1 = defaultArg(f.FactorType, OntologyAnnotation.empty);
49
+ ft = OntologyAnnotation.toString(f_1, true);
50
+ addToDict(matrix.Matrix, [nameLabel, i_1], defaultArg(f.Name, ""));
51
+ addToDict(matrix.Matrix, [factorTypeLabel, i_1], ft.TermName);
52
+ addToDict(matrix.Matrix, [typeTermAccessionNumberLabel, i_1], ft.TermAccessionNumber);
53
+ addToDict(matrix.Matrix, [typeTermSourceREFLabel, i_1], ft.TermSourceREF);
54
+ const matchValue = f.Comments;
55
+ if (matchValue != null) {
56
+ const array = matchValue;
57
+ array.forEach((comment) => {
58
+ const patternInput = Comment_toString(comment);
59
+ const n = patternInput[0];
60
+ commentKeys = cons(n, commentKeys);
61
+ addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
62
+ });
63
+ }
64
+ }, factors);
65
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
66
+ Equals: (x, y) => (x === y),
67
+ GetHashCode: stringHash,
68
+ })), matrix.ColumnCount);
69
+ }
70
+
71
+ export function fromRows(prefix, lineNumber, rows) {
72
+ const tupledArg = (prefix == null) ? SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber) : SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber, prefix);
73
+ return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(tupledArg[3])];
74
+ }
75
+
76
+ export function toRows(prefix, factors) {
77
+ const m = toSparseTable(factors);
78
+ if (prefix == null) {
79
+ return SparseTable_ToRows_6A3D4534(m);
80
+ }
81
+ else {
82
+ return SparseTable_ToRows_6A3D4534(m, prefix);
83
+ }
84
+ }
85
+
@@ -0,0 +1,65 @@
1
+ import { reverse, cons, iterateIndexed, empty, ofArray, map, toArray, initialize, singleton, length } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
3
+ import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
4
+ import { Option_fromValueWithDefault } from "./Conversions.js";
5
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
6
+ import { unwrap } from "../../../fable_modules/fable-library.4.1.4/Option.js";
7
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
8
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
9
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
10
+
11
+ export function fromSparseTable(label, labelTSR, labelTAN, matrix) {
12
+ if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
13
+ const comments = SparseTable_GetEmptyComments_651559CC(matrix);
14
+ return singleton(OntologyAnnotation.create(void 0, void 0, void 0, void 0, comments));
15
+ }
16
+ else {
17
+ return initialize(matrix.ColumnCount, (i) => {
18
+ const comments_1 = Option_fromValueWithDefault([], toArray(map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys)));
19
+ return OntologyAnnotation.fromString(unwrap(SparseTable__TryGetValue_11FD62A8(matrix, [label, i])), unwrap(SparseTable__TryGetValue_11FD62A8(matrix, [labelTSR, i])), unwrap(SparseTable__TryGetValue_11FD62A8(matrix, [labelTAN, i])), unwrap(comments_1));
20
+ });
21
+ }
22
+ }
23
+
24
+ export function toSparseTable(label, labelTSR, labelTAN, designs) {
25
+ const matrix = SparseTable_Create_Z2192E64B(void 0, ofArray([label, labelTAN, labelTSR]), void 0, length(designs) + 1);
26
+ let commentKeys = empty();
27
+ iterateIndexed((i, d) => {
28
+ const i_1 = (i + 1) | 0;
29
+ const oa = OntologyAnnotation.toString(d, true);
30
+ addToDict(matrix.Matrix, [label, i_1], oa.TermName);
31
+ addToDict(matrix.Matrix, [labelTAN, i_1], oa.TermAccessionNumber);
32
+ addToDict(matrix.Matrix, [labelTSR, i_1], oa.TermSourceREF);
33
+ const matchValue = d.Comments;
34
+ if (matchValue != null) {
35
+ const array = matchValue;
36
+ array.forEach((comment) => {
37
+ const patternInput = Comment_toString(comment);
38
+ const n = patternInput[0];
39
+ commentKeys = cons(n, commentKeys);
40
+ addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
41
+ });
42
+ }
43
+ }, designs);
44
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
45
+ Equals: (x, y) => (x === y),
46
+ GetHashCode: stringHash,
47
+ })), matrix.ColumnCount);
48
+ }
49
+
50
+ export function fromRows(prefix, label, labelTSR, labelTAN, lineNumber, rows) {
51
+ const labels = ofArray([label, labelTAN, labelTSR]);
52
+ const tupledArg = (prefix == null) ? SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber) : SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber, prefix);
53
+ return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(label, labelTSR, labelTAN, tupledArg[3])];
54
+ }
55
+
56
+ export function toRows(prefix, label, labelTSR, labelTAN, designs) {
57
+ const m = toSparseTable(label, labelTSR, labelTAN, designs);
58
+ if (prefix == null) {
59
+ return SparseTable_ToRows_6A3D4534(m);
60
+ }
61
+ else {
62
+ return SparseTable_ToRows_6A3D4534(m, prefix);
63
+ }
64
+ }
65
+
@@ -0,0 +1,73 @@
1
+ import { reverse, cons, iterateIndexed, empty, map, toArray, initialize, singleton, length, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { Option_fromValueWithDefault } from "./Conversions.js";
3
+ import { OntologySourceReference } from "../../ISA/JsonTypes/OntologySourceReference.js";
4
+ import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
5
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
6
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
7
+ import { defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
8
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
9
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
10
+
11
+ export const nameLabel = "Term Source Name";
12
+
13
+ export const fileLabel = "Term Source File";
14
+
15
+ export const versionLabel = "Term Source Version";
16
+
17
+ export const descriptionLabel = "Term Source Description";
18
+
19
+ export const labels = ofArray([nameLabel, fileLabel, versionLabel, descriptionLabel]);
20
+
21
+ export function fromString(description, file, name, version, comments) {
22
+ const arg_4 = Option_fromValueWithDefault([], comments);
23
+ return OntologySourceReference.make(description, file, name, version, arg_4);
24
+ }
25
+
26
+ export function fromSparseTable(matrix) {
27
+ if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
28
+ const comments = SparseTable_GetEmptyComments_651559CC(matrix);
29
+ return singleton(OntologySourceReference.create(void 0, void 0, void 0, void 0, comments));
30
+ }
31
+ else {
32
+ return initialize(matrix.ColumnCount, (i) => {
33
+ const comments_1 = toArray(map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys));
34
+ return fromString(SparseTable__TryGetValue_11FD62A8(matrix, [descriptionLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [fileLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [nameLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [versionLabel, i]), comments_1);
35
+ });
36
+ }
37
+ }
38
+
39
+ export function toSparseTable(ontologySources) {
40
+ const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, length(ontologySources) + 1);
41
+ let commentKeys = empty();
42
+ iterateIndexed((i, o) => {
43
+ const i_1 = (i + 1) | 0;
44
+ addToDict(matrix.Matrix, [nameLabel, i_1], defaultArg(o.Name, ""));
45
+ addToDict(matrix.Matrix, [fileLabel, i_1], defaultArg(o.File, ""));
46
+ addToDict(matrix.Matrix, [versionLabel, i_1], defaultArg(o.Version, ""));
47
+ addToDict(matrix.Matrix, [descriptionLabel, i_1], defaultArg(o.Description, ""));
48
+ const matchValue = o.Comments;
49
+ if (matchValue != null) {
50
+ const array = matchValue;
51
+ array.forEach((comment) => {
52
+ const patternInput = Comment_toString(comment);
53
+ const n = patternInput[0];
54
+ commentKeys = cons(n, commentKeys);
55
+ addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
56
+ });
57
+ }
58
+ }, ontologySources);
59
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
60
+ Equals: (x, y) => (x === y),
61
+ GetHashCode: stringHash,
62
+ })), matrix.ColumnCount);
63
+ }
64
+
65
+ export function fromRows(lineNumber, rows) {
66
+ const tupledArg = SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber);
67
+ return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(tupledArg[3])];
68
+ }
69
+
70
+ export function toRows(termSources) {
71
+ return SparseTable_ToRows_6A3D4534(toSparseTable(termSources));
72
+ }
73
+
@@ -0,0 +1,116 @@
1
+ import { reverse, cons, iterate, iterateIndexed, map as map_1, initialize, singleton, length, empty, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
2
+ import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
3
+ import { Component_toAggregatedStrings, ProtocolParameter_toAggregatedStrings, Option_fromValueWithDefault, Component_fromAggregatedStrings, ProtocolParameter_fromAggregatedStrings } from "./Conversions.js";
4
+ import { Protocol_create_Z7DFD6E67, Protocol_make } from "../../ISA/JsonTypes/Protocol.js";
5
+ import { defaultArg, map } from "../../../fable_modules/fable-library.4.1.4/Option.js";
6
+ import { URIModule_fromString } from "../../ISA/JsonTypes/URI.js";
7
+ import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
8
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
9
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
10
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
11
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
12
+
13
+ export const nameLabel = "Name";
14
+
15
+ export const protocolTypeLabel = "Type";
16
+
17
+ export const typeTermAccessionNumberLabel = "Type Term Accession Number";
18
+
19
+ export const typeTermSourceREFLabel = "Type Term Source REF";
20
+
21
+ export const descriptionLabel = "Description";
22
+
23
+ export const uriLabel = "URI";
24
+
25
+ export const versionLabel = "Version";
26
+
27
+ export const parametersNameLabel = "Parameters Name";
28
+
29
+ export const parametersTermAccessionNumberLabel = "Parameters Term Accession Number";
30
+
31
+ export const parametersTermSourceREFLabel = "Parameters Term Source REF";
32
+
33
+ export const componentsNameLabel = "Components Name";
34
+
35
+ export const componentsTypeLabel = "Components Type";
36
+
37
+ export const componentsTypeTermAccessionNumberLabel = "Components Type Term Accession Number";
38
+
39
+ export const componentsTypeTermSourceREFLabel = "Components Type Term Source REF";
40
+
41
+ export const labels = ofArray([nameLabel, protocolTypeLabel, typeTermAccessionNumberLabel, typeTermSourceREFLabel, descriptionLabel, uriLabel, versionLabel, parametersNameLabel, parametersTermAccessionNumberLabel, parametersTermSourceREFLabel, componentsNameLabel, componentsTypeLabel, componentsTypeTermAccessionNumberLabel, componentsTypeTermSourceREFLabel]);
42
+
43
+ export function fromString(name, protocolType, typeTermAccessionNumber, typeTermSourceREF, description, uri, version, parametersName, parametersTermAccessionNumber, parametersTermSourceREF, componentsName, componentsType, componentsTypeTermAccessionNumber, componentsTypeTermSourceREF, comments) {
44
+ const protocolType_1 = OntologyAnnotation.fromString(protocolType, typeTermSourceREF, typeTermAccessionNumber);
45
+ const parameters = ofArray(ProtocolParameter_fromAggregatedStrings(";", parametersName, parametersTermSourceREF, parametersTermAccessionNumber));
46
+ const components = Component_fromAggregatedStrings(";", componentsName, componentsType, componentsTypeTermSourceREF, componentsTypeTermAccessionNumber);
47
+ return Protocol_make(void 0, map(URIModule_fromString, name), Option_fromValueWithDefault(OntologyAnnotation.empty, protocolType_1), description, map(URIModule_fromString, uri), version, Option_fromValueWithDefault(empty(), parameters), Option_fromValueWithDefault(empty(), components), Option_fromValueWithDefault(empty(), comments));
48
+ }
49
+
50
+ export function fromSparseTable(matrix) {
51
+ if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
52
+ return singleton(Protocol_create_Z7DFD6E67(void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, ofArray(SparseTable_GetEmptyComments_651559CC(matrix))));
53
+ }
54
+ else {
55
+ return initialize(matrix.ColumnCount, (i) => {
56
+ const comments_1 = map_1((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys);
57
+ return fromString(SparseTable__TryGetValue_11FD62A8(matrix, [nameLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [protocolTypeLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [typeTermAccessionNumberLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [typeTermSourceREFLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [descriptionLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [uriLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [versionLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [parametersNameLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [parametersTermAccessionNumberLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [parametersTermSourceREFLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [componentsNameLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [componentsTypeLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [componentsTypeTermAccessionNumberLabel, i]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [componentsTypeTermSourceREFLabel, i]), comments_1);
58
+ });
59
+ }
60
+ }
61
+
62
+ export function toSparseTable(protocols) {
63
+ const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, length(protocols) + 1);
64
+ let commentKeys = empty();
65
+ iterateIndexed((i, p) => {
66
+ const i_1 = (i + 1) | 0;
67
+ let pt_1;
68
+ const pt = defaultArg(p.ProtocolType, OntologyAnnotation.empty);
69
+ pt_1 = OntologyAnnotation.toString(pt, true);
70
+ const pAgg = ProtocolParameter_toAggregatedStrings(";", defaultArg(p.Parameters, empty()));
71
+ const cAgg = Component_toAggregatedStrings(";", defaultArg(p.Components, empty()));
72
+ addToDict(matrix.Matrix, [nameLabel, i_1], defaultArg(p.Name, ""));
73
+ addToDict(matrix.Matrix, [protocolTypeLabel, i_1], pt_1.TermName);
74
+ addToDict(matrix.Matrix, [typeTermAccessionNumberLabel, i_1], pt_1.TermAccessionNumber);
75
+ addToDict(matrix.Matrix, [typeTermSourceREFLabel, i_1], pt_1.TermSourceREF);
76
+ addToDict(matrix.Matrix, [descriptionLabel, i_1], defaultArg(p.Description, ""));
77
+ addToDict(matrix.Matrix, [uriLabel, i_1], defaultArg(p.Uri, ""));
78
+ addToDict(matrix.Matrix, [versionLabel, i_1], defaultArg(p.Version, ""));
79
+ addToDict(matrix.Matrix, [parametersNameLabel, i_1], pAgg.TermNameAgg);
80
+ addToDict(matrix.Matrix, [parametersTermAccessionNumberLabel, i_1], pAgg.TermAccessionNumberAgg);
81
+ addToDict(matrix.Matrix, [parametersTermSourceREFLabel, i_1], pAgg.TermSourceREFAgg);
82
+ addToDict(matrix.Matrix, [componentsNameLabel, i_1], cAgg.NameAgg);
83
+ addToDict(matrix.Matrix, [componentsTypeLabel, i_1], cAgg.TermNameAgg);
84
+ addToDict(matrix.Matrix, [componentsTypeTermAccessionNumberLabel, i_1], cAgg.TermAccessionNumberAgg);
85
+ addToDict(matrix.Matrix, [componentsTypeTermSourceREFLabel, i_1], cAgg.TermSourceREFAgg);
86
+ const matchValue = p.Comments;
87
+ if (matchValue != null) {
88
+ iterate((comment) => {
89
+ const patternInput = Comment_toString(comment);
90
+ const n = patternInput[0];
91
+ commentKeys = cons(n, commentKeys);
92
+ addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
93
+ }, matchValue);
94
+ }
95
+ }, protocols);
96
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
97
+ Equals: (x, y) => (x === y),
98
+ GetHashCode: stringHash,
99
+ })), matrix.ColumnCount);
100
+ }
101
+
102
+ export function fromRows(prefix, lineNumber, rows) {
103
+ const tupledArg = (prefix == null) ? SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber) : SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber, prefix);
104
+ return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(tupledArg[3])];
105
+ }
106
+
107
+ export function toRows(prefix, protocols) {
108
+ const m = toSparseTable(protocols);
109
+ if (prefix == null) {
110
+ return SparseTable_ToRows_6A3D4534(m);
111
+ }
112
+ else {
113
+ return SparseTable_ToRows_6A3D4534(m, prefix);
114
+ }
115
+ }
116
+