@platforma-open/milaboratories.samples-and-data.workflow 2.1.0 → 2.2.1
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.
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
3
|
+
pColumn := import("@platforma-sdk/workflow-tengo:pframes.pcolumn")
|
|
4
|
+
json := import("json")
|
|
5
|
+
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
6
|
+
util := import("@platforma-open/milaboratories.samples-and-data.workflow:util")
|
|
7
|
+
|
|
8
|
+
createDataset := func(blockId, sampleIdAxis, groupIdAxis, dataset, importFile) {
|
|
9
|
+
extension := dataset.content.gzipped ? "fastq.gz" : "fastq"
|
|
10
|
+
|
|
11
|
+
spec := util.datasetColumnSpecBase(blockId, dataset, extension)
|
|
12
|
+
|
|
13
|
+
readIndexAxisSpec := {
|
|
14
|
+
type: "String",
|
|
15
|
+
name: "pl7.app/sequencing/readIndex",
|
|
16
|
+
annotations: {
|
|
17
|
+
"pl7.app/label": "Read Index"
|
|
18
|
+
},
|
|
19
|
+
domain: {
|
|
20
|
+
"pl7.app/readIndices": string(json.encode(dataset.content.readIndices))
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
spec.axesSpec = [groupIdAxis, readIndexAxisSpec]
|
|
25
|
+
|
|
26
|
+
data := pColumn.resourceMapBuilder(2)
|
|
27
|
+
for groupId, fileGroup in dataset.content.data {
|
|
28
|
+
for _, readIndex in dataset.content.readIndices {
|
|
29
|
+
importHandle := fileGroup[readIndex]
|
|
30
|
+
if !importHandle {
|
|
31
|
+
ll.panic("File handle not set for %v in group %v", readIndex, groupId)
|
|
32
|
+
}
|
|
33
|
+
data.add([groupId, readIndex], importFile(importHandle))
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
result := {}
|
|
38
|
+
result["dataset." + dataset.id] = {
|
|
39
|
+
spec: spec,
|
|
40
|
+
data: data.build()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getSamples := func(dataset, importFile) {
|
|
47
|
+
|
|
48
|
+
return {}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
isGrouped: true,
|
|
53
|
+
createDataset: createDataset,
|
|
54
|
+
getSamples: getSamples
|
|
55
|
+
}
|
|
56
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.samples-and-data.workflow",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*"
|
|
7
7
|
],
|
|
8
8
|
"description": "Tengo-based template",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@platforma-sdk/workflow-tengo": "5.
|
|
11
|
-
"@platforma-open/milaboratories.samples-and-data.parse-h5ad": "1.1.
|
|
10
|
+
"@platforma-sdk/workflow-tengo": "5.6.1",
|
|
11
|
+
"@platforma-open/milaboratories.samples-and-data.parse-h5ad": "1.1.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@platforma-sdk/tengo-builder": "2.3.
|
|
14
|
+
"@platforma-sdk/tengo-builder": "2.3.9"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rm -rf dist/* && pl-tengo check && pl-tengo build",
|