Skip to content

Commit fbbaa3c

Browse files
committed
NEW step in the pipeline to generate output plots
1 parent 235e3f4 commit fbbaa3c

File tree

5 files changed

+1105
-0
lines changed

5 files changed

+1105
-0
lines changed

05_output_plots.nf

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
SATURATION_OUT = Channel.fromPath("${OUTPUT}/saturation/prediction/*.model.*.features.*.prediction.tsv.gz")
2+
GENE_TTYPE_SATURATION_OUT = SATURATION_OUT.map{ it -> [it.baseName.split('\\.')[0], it.baseName.split('\\.')[2], it.baseName.split('\\.')[4]]}
3+
4+
5+
process Blueprints {
6+
tag "Generate blueprints for gene=${gene} model=${ttype_model} features=${ttype_features}"
7+
label "boostdm"
8+
publishDir "${OUTPUT}/output_plots/blueprints", mode: 'copy'
9+
10+
input:
11+
tuple val(gene), val(ttype_model), val(ttype_features) from GENE_TTYPE_SATURATION_OUT
12+
13+
output:
14+
path("${gene}.model.${ttype_model}.features.${ttype_features}.*") into OUT_BLUEPRINT
15+
16+
script:
17+
18+
"""
19+
runner.sh output_plots/blueprint.py \
20+
--gene ${gene} \
21+
--ttmodel ${ttype_model} \
22+
--ttfeatures ${ttype_features}
23+
"""
24+
}
25+
26+
27+
process ClusteredBlueprints {
28+
tag "Generate all blueprint stacks with hierarchical clustering"
29+
label "boostdm"
30+
publishDir "${OUTPUT}/output_plots/clustered_blueprints", mode: 'copy'
31+
32+
output:
33+
path("*.clustered_blueprint.*") into OUT_CLUSTERED_BLUEPRINT
34+
35+
script:
36+
37+
"""
38+
runner.sh output_plots/clustered_blueprint.py
39+
"""
40+
}
41+
42+
43+
TRAINING_OUT = Channel.fromPath("${OUTPUT}/training_meta/*/*.models.pickle.gz")
44+
GENE_TTYPE_TRAINING_OUT = TRAINING_OUT.map{ it -> [it.baseName.split('\\.')[0], it.getParent().baseName]}
45+
46+
process DiscoveryBending {
47+
tag "Generate inverse exponential fit with unique mutation count in subsamples for gene=${gene} ttype=${ttype}"
48+
label "boostdm"
49+
publishDir "${OUTPUT}/output_plots/discovery_bending", mode: 'copy'
50+
51+
input:
52+
tuple val(gene), val(ttype) from GENE_TTYPE_TRAINING_OUT
53+
54+
output:
55+
path("*.*.bending.*") into OUT_DISCOVERY_BENDING
56+
57+
script:
58+
59+
"""
60+
runner.sh output_plots/discovery_plot.py \
61+
--gene ${gene} \
62+
--ttmodel ${ttype}
63+
"""
64+
}

0 commit comments

Comments
 (0)