@platforma-open/milaboratories.mixcr-shm-trees.workflow 4.0.1 → 4.2.0

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,7 +1,7 @@
1
1
   WARN  Issue while reading "/home/runner/work/mixcr-shm-trees/mixcr-shm-trees/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.mixcr-shm-trees.workflow@4.0.1 build /home/runner/work/mixcr-shm-trees/mixcr-shm-trees/workflow
4
- > rm -rf dist && pl-tengo check && pl-tengo build
3
+ > @platforma-open/milaboratories.mixcr-shm-trees.workflow@4.2.0 build /home/runner/work/mixcr-shm-trees/mixcr-shm-trees/workflow
4
+ > shx rm -rf dist && pl-tengo check && pl-tengo build
5
5
 
6
6
  Processing "src/export-settings.lib.tengo"...
7
7
  Processing "src/main.tpl.tengo"...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-open/milaboratories.mixcr-shm-trees.workflow
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f16a929: Add ability to control CPU and MEM allocated for each sample processing via advanced settings of a block
8
+
9
+ ## 4.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 2ce3a8a: SDK version update
14
+
3
15
  ## 4.0.1
4
16
 
5
17
  ### Patch Changes
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.mixcr-shm-trees.workflow",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "type": "module",
5
5
  "description": "Tengo-based template",
6
6
  "//": {
7
- "build": "node ./scripts/build-static.mjs src/pfconv_params.json src/pfconv_params.lib.tengo && rm -rf dist && pl-tengo check && pl-tengo build && ./create_tags.sh"
7
+ "build": "node ./scripts/build-static.mjs src/pfconv_params.json src/pfconv_params.lib.tengo && shx rm -rf dist && pl-tengo check && pl-tengo build && ./create_tags.sh"
8
8
  },
9
9
  "dependencies": {
10
- "@platforma-sdk/workflow-tengo": "^5.3.3"
10
+ "@platforma-sdk/workflow-tengo": "^5.5.9"
11
11
  },
12
12
  "devDependencies": {
13
- "@platforma-sdk/tengo-builder": "^2.3.0",
13
+ "@platforma-sdk/tengo-builder": "^2.3.3",
14
14
  "@platforma-open/milaboratories.software-mixcr": "4.7.0-235-develop",
15
15
  "@platforma-open/milaboratories.software-mitool": "2.3.1-24-main",
16
16
  "@platforma-open/milaboratories.software-ptransform": "^1.6.6",
17
- "@platforma-sdk/test": "^1.44.7",
17
+ "@platforma-sdk/test": "^1.45.11",
18
18
  "vitest": "~2.1.8",
19
19
  "typescript": "~5.5.4"
20
20
  },
21
21
  "scripts": {
22
- "build": "rm -rf dist && pl-tengo check && pl-tengo build",
22
+ "build": "shx rm -rf dist && pl-tengo check && pl-tengo build",
23
23
  "format": "/usr/bin/env emacs --script ./format.el"
24
24
  }
25
25
  }
@@ -46,7 +46,9 @@ wf.body(func(args) {
46
46
  },
47
47
  params: {
48
48
  downsampling: args.downsampling,
49
- sequencesOfInterest: args.sequencesOfInterest
49
+ sequencesOfInterest: args.sequencesOfInterest,
50
+ perProcessMemGB: args.perProcessMemGB,
51
+ perProcessCPUs: args.perProcessCPUs
50
52
  }
51
53
  })
52
54
 
@@ -32,6 +32,9 @@ self.body(func(inputs) {
32
32
  shmTreeNodesWithClonesEnsureUniquenessParams := params.shmTreeNodesWithClonesEnsureUniquenessParams
33
33
  shmTreeNodesUniqueIsotypeEnsureUniquenessParams := params.shmTreeNodesUniqueIsotypeEnsureUniquenessParams
34
34
 
35
+ perProcessMemGB := inputs.perProcessMemGB
36
+ perProcessCPUs := inputs.perProcessCPUs
37
+
35
38
  addLibraryFile := func(cmdBuilder) {
36
39
  if !is_undefined(library) {
37
40
  if libraryFormat == "repseqio.json.gz" {
@@ -79,6 +82,16 @@ self.body(func(inputs) {
79
82
  arg("exportShmTreesWithNodes").
80
83
  env("CIDADHOC", "1234")
81
84
 
85
+ // CPUs number per process
86
+ if !is_undefined(perProcessCPUs) && perProcessCPUs > 0 {
87
+ shmTreeNodesExportsCmdBuilder.cpu(perProcessCPUs)
88
+ }
89
+
90
+ // Memory limit per process
91
+ if !is_undefined(perProcessMemGB) && perProcessMemGB > 0 {
92
+ shmTreeNodesExportsCmdBuilder.mem(string(perProcessMemGB) + "GiB")
93
+ }
94
+
82
95
  addLibraryFile(shmTreeNodesExportsCmdBuilder)
83
96
 
84
97
  for arg in shmTreeNodesArgs {
@@ -108,6 +121,16 @@ self.body(func(inputs) {
108
121
  arg("--only-observed").
109
122
  env("CIDADHOC", "1234")
110
123
 
124
+ // CPUs number per process
125
+ if !is_undefined(perProcessCPUs) && perProcessCPUs > 0 {
126
+ shmTreeNodesWithClonesExportsCmdBuilder.cpu(perProcessCPUs)
127
+ }
128
+
129
+ // Memory limit per process
130
+ if !is_undefined(perProcessMemGB) && perProcessMemGB > 0 {
131
+ shmTreeNodesWithClonesExportsCmdBuilder.mem(string(perProcessMemGB) + "GiB")
132
+ }
133
+
111
134
  addLibraryFile(shmTreeNodesWithClonesExportsCmdBuilder)
112
135
 
113
136
  for arg in shmTreeNodesWithClonesArgs {
@@ -33,6 +33,9 @@ self.body(func(inputs) {
33
33
  libraryFormat := globalParams.libraryFormat
34
34
  downsampling := globalParams.downsampling
35
35
 
36
+ perProcessMemGB := inputs.perProcessMemGB
37
+ perProcessCPUs := inputs.perProcessCPUs
38
+
36
39
  ll.assert(!is_undefined(datasetTypes), "datasetTypes undefined")
37
40
 
38
41
  addLibraryFile := func(cmdBuilder) {
@@ -66,6 +69,16 @@ self.body(func(inputs) {
66
69
  arg("--output-template").arg("alleles/{file_name}.clns").
67
70
  env("CIDADHOC", "1234")
68
71
 
72
+ // CPUs number per process
73
+ if !is_undefined(perProcessCPUs) && perProcessCPUs > 0 {
74
+ allelesCmdBuilder.cpu(perProcessCPUs)
75
+ }
76
+
77
+ // Memory limit per process
78
+ if !is_undefined(perProcessMemGB) && perProcessMemGB > 0 {
79
+ allelesCmdBuilder.mem(string(perProcessMemGB) + "GiB")
80
+ }
81
+
69
82
  addLibraryFile(allelesCmdBuilder)
70
83
 
71
84
  if !is_undefined(globalParams.seed) {
@@ -136,6 +149,17 @@ self.body(func(inputs) {
136
149
  addFile("clones.clns", entry.afterAlleles).
137
150
  saveFile("clones.downsampled.clns").
138
151
  env("CIDADHOC", "1234")
152
+
153
+ // CPUs number per process
154
+ if !is_undefined(perProcessCPUs) && perProcessCPUs > 0 {
155
+ downsamplingCmdBuilder.cpu(perProcessCPUs)
156
+ }
157
+
158
+ // Memory limit per process
159
+ if !is_undefined(perProcessMemGB) && perProcessMemGB > 0 {
160
+ downsamplingCmdBuilder.mem(string(perProcessMemGB) + "GiB")
161
+ }
162
+
139
163
  addLibraryFile(downsamplingCmdBuilder)
140
164
  downsamplingCmd := downsamplingCmdBuilder.run()
141
165
 
@@ -161,6 +185,16 @@ self.body(func(inputs) {
161
185
  saveFile("report.json").
162
186
  env("CIDADHOC", "1234")
163
187
 
188
+ // CPUs number per process
189
+ if !is_undefined(perProcessCPUs) && perProcessCPUs > 0 {
190
+ shmTreesCmdBuilder.cpu(perProcessCPUs)
191
+ }
192
+
193
+ // Memory limit per process
194
+ if !is_undefined(perProcessMemGB) && perProcessMemGB > 0 {
195
+ shmTreesCmdBuilder.mem(string(perProcessMemGB) + "GiB")
196
+ }
197
+
164
198
  if !is_undefined(globalParams.seed) {
165
199
  shmTreesCmdBuilder.env("SEED", globalParams.seed)
166
200
  }
@@ -9,6 +9,7 @@ xsv := import("@platforma-sdk/workflow-tengo:pframes.xsv")
9
9
  smart := import("@platforma-sdk/workflow-tengo:smart")
10
10
  text := import("text")
11
11
  json := import("json")
12
+ times := import("times")
12
13
  exportSettings := import(":export-settings")
13
14
  prepareDonorColumn := import(":prepare-donor-column")
14
15
  pframes := import("@platforma-sdk/workflow-tengo:pframes")
@@ -41,7 +42,7 @@ soiTpl := assets.importTemplate(":soi")
41
42
 
42
43
  self.body(func(inputs) {
43
44
  // overall description of data that we have.
44
- dataDescription := {
45
+ dataDescription := {
45
46
  hasUmiTags: false,
46
47
  hasCellTags: false,
47
48
  // will be filled
@@ -50,6 +51,12 @@ self.body(func(inputs) {
50
51
  cellsAssembled: false
51
52
  }
52
53
 
54
+ perProcessMemGB := inputs.params.perProcessMemGB
55
+ perProcessCPUs := inputs.params.perProcessCPUs
56
+ inputParams := inputs.params
57
+ delete(inputParams, "perProcessMemGB") // do not affect deduplication of results
58
+ delete(inputParams, "perProcessCPUs") // do not affect deduplication of results
59
+
53
60
  blockId := inputs.etc.blockId
54
61
  firstDatasetSpec := inputs.etc.firstDatasetSpec
55
62
 
@@ -173,10 +180,15 @@ self.body(func(inputs) {
173
180
  traceSteps: [{type: "milaboratories.mixcr-shm-trees", id: blockId, importance: 19, label: "SHM Trees"}],
174
181
  extra: {
175
182
  library: is_undefined(library) ? smart.createNullResource() : library.data,
176
- globalParams: maps.merge(inputs.params, {
183
+ globalParams: maps.merge(inputParams, {
184
+ seed: times.time_string(times.now()),
177
185
  datasetTypes: datasetTypes,
178
186
  libraryFormat: libraryFormat
179
187
  })
188
+ },
189
+ metaExtra: {
190
+ perProcessMemGB: perProcessMemGB,
191
+ perProcessCPUs: perProcessCPUs
180
192
  }
181
193
  }
182
194
  )
@@ -225,6 +237,10 @@ self.body(func(inputs) {
225
237
  shmTreeNodesWithClonesEnsureUniquenessParams: tablesAggregation.ensureUniquenessParamsFromPconvParams(shmTreeNodesWithClonesTableOptions.pfconvParams),
226
238
  shmTreeNodesUniqueIsotypeEnsureUniquenessParams: tablesAggregation.ensureUniquenessParamsFromPconvParams(shmTreeNodesUniqueIsotypeTableOptions.pfconvParams)
227
239
  }
240
+ },
241
+ metaExtra: {
242
+ perProcessMemGB: perProcessMemGB,
243
+ perProcessCPUs: perProcessCPUs
228
244
  }
229
245
  }
230
246
  )