@platforma-open/milaboratories.rarefaction.workflow 1.1.3 → 1.1.5

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.
@@ -1,11 +1,13 @@
1
1
   WARN  Issue while reading "/home/runner/work/rarefaction/rarefaction/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.rarefaction.workflow@1.1.3 build /home/runner/work/rarefaction/rarefaction/workflow
3
+ > @platforma-open/milaboratories.rarefaction.workflow@1.1.5 build /home/runner/work/rarefaction/rarefaction/workflow
4
4
  > rm -rf dist && pl-tengo check && pl-tengo build
5
5
 
6
6
  Processing "src/main.tpl.tengo"...
7
+ Processing "src/rarefaction-calculation.tpl.tengo"...
7
8
  No syntax errors found.
8
9
  info: Compiling 'dist'...
10
+ info: - writing /home/runner/work/rarefaction/rarefaction/workflow/dist/tengo/tpl/rarefaction-calculation.plj.gz
9
11
  info: - writing /home/runner/work/rarefaction/rarefaction/workflow/dist/tengo/tpl/main.plj.gz
10
12
  info: Template Pack build done.
11
13
  info: Template Pack build done.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @platforma-open/milaboratories.rarefaction.workflow
2
2
 
3
+ ## 1.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8e56508: Show running state for tables and graphs
8
+ - Updated dependencies [8e56508]
9
+ - @platforma-open/milaboratories.rarefaction.software@1.2.4
10
+
11
+ ## 1.1.4
12
+
13
+ ### Patch Changes
14
+
15
+ - 602e87e: Fix deduplication
16
+
3
17
  ## 1.1.3
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1,3 +1,4 @@
1
1
  module.exports = { Templates: {
2
+ 'rarefaction-calculation': { type: 'from-file', path: require.resolve('./tengo/tpl/rarefaction-calculation.plj.gz') },
2
3
  'main': { type: 'from-file', path: require.resolve('./tengo/tpl/main.plj.gz') }
3
4
  }};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
2
- declare type TplName = "main";
2
+ declare type TplName = "rarefaction-calculation" | "main";
3
3
  declare const Templates: Record<TplName, TemplateFromFile>;
4
4
  export { Templates };
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { resolve } from 'node:path';
2
2
  export const Templates = {
3
+ 'rarefaction-calculation': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/rarefaction-calculation.plj.gz') },
3
4
  'main': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/main.plj.gz') }
4
5
  };
Binary file
package/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.rarefaction.workflow",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
- "description": "Block Workflow",
5
+ "description": "Tengo-based template",
6
6
  "dependencies": {
7
- "@platforma-sdk/workflow-tengo": "^5.4.2",
8
- "@platforma-open/milaboratories.rarefaction.software": "1.2.3"
7
+ "@platforma-sdk/workflow-tengo": "5.8.0",
8
+ "@platforma-open/milaboratories.rarefaction.software": "1.2.4"
9
9
  },
10
10
  "devDependencies": {
11
- "@platforma-sdk/tengo-builder": "^2.3.2",
12
- "@platforma-sdk/test": "^1.44.19",
13
- "vitest": "^2.1.8"
11
+ "@platforma-sdk/tengo-builder": "2.4.8"
14
12
  },
15
13
  "scripts": {
16
14
  "build": "rm -rf dist && pl-tengo check && pl-tengo build",
17
- "test": "vitest",
18
- "format": "/usr/bin/env emacs --script ./format.el"
15
+ "format": "/usr/bin/env emacs --script ./format.el",
16
+ "do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz"
19
17
  }
20
18
  }
@@ -1,13 +1,13 @@
1
1
  wf := import("@platforma-sdk/workflow-tengo:workflow")
2
- exec := import("@platforma-sdk/workflow-tengo:exec")
3
2
  assets := import("@platforma-sdk/workflow-tengo:assets")
4
3
  ll := import("@platforma-sdk/workflow-tengo:ll")
5
4
  pframes := import("@platforma-sdk/workflow-tengo:pframes")
6
5
  xsv := import("@platforma-sdk/workflow-tengo:pframes.xsv")
7
6
  pSpec := import("@platforma-sdk/workflow-tengo:pframes.spec")
8
7
  maps := import("@platforma-sdk/workflow-tengo:maps")
8
+ render := import("@platforma-sdk/workflow-tengo:render")
9
9
 
10
- rarefactionSw := assets.importSoftware("@platforma-open/milaboratories.rarefaction.software:main")
10
+ rarefactionTpl := assets.importTemplate(":rarefaction-calculation")
11
11
 
12
12
  getSpec := func(abundanceSpec, args) {
13
13
  return {
@@ -98,8 +98,6 @@ wf.prepare(func(args) {
98
98
  })
99
99
 
100
100
  wf.body(func(args) {
101
- infile := "rarefaction-input.tsv"
102
- outfile := "rarefaction-output.tsv"
103
101
 
104
102
  datasetSpec := args.columns.getSpec(args.datasetRef)
105
103
  tsvBuilder := pframes.tsvFileBuilder()
@@ -107,23 +105,19 @@ wf.body(func(args) {
107
105
  tsvBuilder.setAxisHeader(datasetSpec.axesSpec[1].name, "clonotypeKey")
108
106
  tsv := tsvBuilder.build()
109
107
 
110
- rarefactionCmd := exec.builder().
111
- software(rarefactionSw).
112
- mem(string(args.mem) + "GiB").
113
- cpu(args.cpu).
114
- arg(infile).
115
- addFile(infile, tsv).
116
- arg(outfile).
117
- arg(args.numPoints).
118
- arg(args.numIterations).
119
- arg(string(args.extrapolation)).
120
- saveFile(outfile).
121
- dontSaveStdoutOrStderr().
122
- cacheMinutes(24*60).
123
- printErrStreamToStdout().
124
- run()
108
+ // Call UMAP calculation subtemplate
109
+ rarefactionRender := render.create(rarefactionTpl, {
110
+ inputTsv: tsv,
111
+ numPoints: args.numPoints,
112
+ numIterations: args.numIterations,
113
+ extrapolation: args.extrapolation,
114
+ metaInputs: {
115
+ mem: args.mem,
116
+ cpu: args.cpu
117
+ }
118
+ })
125
119
 
126
- rarefactionPFrame := xsv.importFile(rarefactionCmd.getFile(outfile), "tsv", getSpec(datasetSpec, args), {
120
+ rarefactionPFrame := xsv.importFile(rarefactionRender.output("rarefactionOutput"), "tsv", getSpec(datasetSpec, args), {
127
121
  splitDataAndSpec: true
128
122
  })
129
123
 
@@ -0,0 +1,52 @@
1
+ self := import("@platforma-sdk/workflow-tengo:tpl")
2
+ exec := import("@platforma-sdk/workflow-tengo:exec")
3
+ assets := import("@platforma-sdk/workflow-tengo:assets")
4
+
5
+ rarefactionSw := assets.importSoftware("@platforma-open/milaboratories.rarefaction.software:main")
6
+
7
+ self.validateInputs({
8
+ "__options__,closed": "",
9
+ inputTsv: "any",
10
+ numPoints: "string",
11
+ numIterations: "string",
12
+ extrapolation: "boolean",
13
+ metaInputs: {
14
+ "__options__,closed": "",
15
+ "mem,?": "number",
16
+ "cpu,?": "number"
17
+ }
18
+ })
19
+
20
+ self.defineOutputs("rarefactionOutput")
21
+
22
+ self.body(func(args) {
23
+ // Get input parameters
24
+ cpu := args.metaInputs.cpu
25
+ mem := args.metaInputs.mem
26
+ numPoints := args.numPoints
27
+ numIterations := args.numIterations
28
+ extrapolation := args.extrapolation
29
+ inputTsv := args.inputTsv
30
+
31
+ infile := "rarefaction-input.tsv"
32
+ outfile := "rarefaction-output.tsv"
33
+
34
+ rarefactionCmd := exec.builder().
35
+ software(rarefactionSw).
36
+ mem(string(mem) + "GiB").
37
+ cpu(cpu).
38
+ arg(infile).
39
+ addFile(infile, inputTsv).
40
+ arg(outfile).
41
+ arg(numPoints).
42
+ arg(numIterations).
43
+ arg(string(extrapolation)).
44
+ saveFile(outfile).
45
+ cacheMinutes(4*60).
46
+ printErrStreamToStdout().
47
+ run()
48
+
49
+ return {
50
+ rarefactionOutput: rarefactionCmd.getFile(outfile)
51
+ }
52
+ })
package/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
2
- declare type TplName = "main";
3
- declare const Templates: Record<TplName, TemplateFromFile>;
4
- export { Templates };
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = { Templates: {
2
- 'main': { type: 'from-file', path: require.resolve('./dist/tengo/tpl/main.plj.gz') }
3
- }}
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2022",
4
- "module": "commonjs",
5
- "moduleResolution": "node",
6
- "esModuleInterop": true,
7
- "strict": true,
8
- "outDir": "./dist",
9
- "rootDir": "./src",
10
- "sourceMap": true,
11
- "declaration": true
12
- },
13
- "types": [],
14
- "include": ["src/**/*"],
15
- "exclude": ["node_modules", "dist"]
16
- }
package/vitest.config.mts DELETED
@@ -1,9 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- watch: false,
6
- maxConcurrency: 3,
7
- testTimeout: 5000
8
- }
9
- });