diff --git a/docs/scripts_js/ArcInvestigation.js b/docs/scripts_js/ArcInvestigation.js index afbddfe1..222a47f1 100644 --- a/docs/scripts_js/ArcInvestigation.js +++ b/docs/scripts_js/ArcInvestigation.js @@ -1,6 +1,4 @@ import { ArcInvestigation, Comment$ as Comment, XlsxController, JsonController} from "@nfdi4plants/arctrl" -// Import Spreadsheet to XLSX reader/writer -import {Xlsx} from "@fslab/fsspreadsheet"; // # Comments diff --git a/docs/scripts_js/EXAMPLE_CreateAssayFile.js b/docs/scripts_js/EXAMPLE_CreateAssayFile.js index c21b08f1..8d1c0b40 100644 --- a/docs/scripts_js/EXAMPLE_CreateAssayFile.js +++ b/docs/scripts_js/EXAMPLE_CreateAssayFile.js @@ -6,21 +6,6 @@ // Import ARCtrl import * as arctrl from "@nfdi4plants/arctrl" -// Alternative import -// import { - // Comment$ as Comment, OntologyAnnotation, Person, Publication, - // IOType, CompositeHeader, CompositeCell, CompositeColumn, ArcTable, - // ArcAssay, ArcStudy, ArcInvestigation, - // Template, Organisation, Templates, JsWeb, - // ARC } from "@nfdi4plants/arctrl"; - -// Import ARCtrl Assay to Spreadsheet transformation -import {toFsWorkbook,fromFsWorkbook} from "@nfdi4plants/arctrl/ISA/ISA.Spreadsheet/ArcAssay.js" -// Import ARCtrl Study to Spreadsheet transformation -// import {toFsWorkbook,fromFsWorkbook} from "@nfdi4plants/arctrl/ISA/ISA.Spreadsheet/ArcStudy.js" -// Import ARCtrl Investigation to Spreadsheet transformation -// import {toFsWorkbook,fromFsWorkbook} from "@nfdi4plants/arctrl/ISA/ISA.Spreadsheet/ArcInvestigation.js" - // Import Spreadsheet to XLSX reader/writer import {Xlsx} from "@fslab/fsspreadsheet"; @@ -36,15 +21,15 @@ const growth = arctrl.ArcTable.init("Growth"); growth.AddColumn(arctrl.CompositeHeader.input(arctrl.IOType.source()), [arctrl.CompositeCell.createFreeText("Input1")]); // Add characteristic column with one value -const oa_species = arctrl.OntologyAnnotation.fromString("species", "GO", "GO:0123456"); -const oa_chlamy = arctrl.OntologyAnnotation.fromString("Chlamy", "NCBI", "NCBI:0123456"); +const oa_species = new arctrl.OntologyAnnotation("species", "GO", "GO:0123456"); +const oa_chlamy = new arctrl.OntologyAnnotation("Chlamy", "NCBI", "NCBI:0123456"); growth.AddColumn(arctrl.CompositeHeader.characteristic(oa_species), [arctrl.CompositeCell.createTerm(oa_chlamy)]); // Add table to assay myAssay.AddTable(growth); // -------- 2. Transform object to generic spreadsheet ---------- -let spreadsheet = toFsWorkbook(myAssay); +let spreadsheet = arctrl.XlsxController.Assay.toFsWorkbook(myAssay); // -------- 3. Write spreadsheet to xlsx file (or bytes) ---------- const outPath = "./myFile.xlsx"; diff --git a/docs/scripts_js/Tables.js b/docs/scripts_js/Tables.js index e78c78eb..a2eabcb7 100644 --- a/docs/scripts_js/Tables.js +++ b/docs/scripts_js/Tables.js @@ -9,12 +9,12 @@ const growth = myStudy.InitTable("Growth") // create ontology annotation for "species" const oa_species = - OntologyAnnotation.fromString( + new OntologyAnnotation( "species", "GO", "GO:0123456" ) // create ontology annotation for "chlamy" const oa_chlamy = - OntologyAnnotation.fromString( + new OntologyAnnotation( "Chlamy", "NCBI", "NCBI:0123456" ); @@ -23,7 +23,7 @@ const oa_chlamy = // in xlsx this will be exactly 1 column. // Syntax on CompositeHeader, IOType and even CompositeCell will soon improve! growth.AddColumn( - CompositeHeader.input(IOType.source), + CompositeHeader.input(IOType.source()), [CompositeCell.createFreeText("Input1")] ); diff --git a/docs/scripts_js/package-lock.json b/docs/scripts_js/package-lock.json index efb9976a..1d8e1d71 100644 --- a/docs/scripts_js/package-lock.json +++ b/docs/scripts_js/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@fslab/fsspreadsheet": "^6.0.1", + "@fslab/fsspreadsheet": "^6.1.2", "@nfdi4plants/arctrl": "^2.0.0-alpha.2" } }, @@ -41,9 +41,9 @@ } }, "node_modules/@fslab/fsspreadsheet": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@fslab/fsspreadsheet/-/fsspreadsheet-6.0.1.tgz", - "integrity": "sha512-2Hs3NPz0MR8qetGbZ7mdoJJWcEEECcrXL+DMp2Vv7WgcalA4eD7i74TT+wl/zaQPo+i1y5mOjzXYtxaOvwP8YA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@fslab/fsspreadsheet/-/fsspreadsheet-6.1.2.tgz", + "integrity": "sha512-UdqYa401WiWTtRji4weE8rmQDNYQ1cBRoitRTTFIGTFfblV15dUJzGxIIl72af83ZoL/Ibz5dusud2clwmW1ww==", "dependencies": { "@nfdi4plants/exceljs": "^0.3.0" } diff --git a/docs/scripts_js/package.json b/docs/scripts_js/package.json index 3bc86bf1..d2ceda1b 100644 --- a/docs/scripts_js/package.json +++ b/docs/scripts_js/package.json @@ -9,7 +9,7 @@ "author": "Kevin Frey", "license": "MIT", "dependencies": { - "@fslab/fsspreadsheet": "^6.0.1", + "@fslab/fsspreadsheet": "^6.1.2", "@nfdi4plants/arctrl": "^2.0.0-alpha.2" } }