11process EPICORE {
2- tag " $meta . id "
3- label ' process_high'
4-
5- conda " bioconda::epicore=0.1.5"
6- container " ${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7- 'https://depot.galaxyproject.org/singularity/epicore:0.1.5--pyhdfd78af_0' :
8- 'biocontainers/epicore:0.1.5--pyhdfd78af_0' } "
9-
10- input:
11- tuple val(meta_fasta), path(fasta)
12- path(quantification_tsv)
13- path(general_stats)
14- val(meta)
15-
16- output:
17- path " *_general_stats.csv" , emit: stats
18- path " ${ meta.id} .csv" , emit: final_epicore_csv
19- path " epicore_length_distribution.html" , emit: length_dist
20- path " epicore_intensity_histogram.html" , emit: intensity_hist
21- path " versions.yml" , emit: versions
22-
23- script:
24- def args = task. ext. args ?: ' '
25- def prefix = task. ext. prefix ?: " ${ meta.id} "
26- """ #!/bin/bash
27-
28- epicore --reference_proteome $fasta --out_dir . generate-epicore-csv $args --evidence_file $quantification_tsv --html
29-
30- mv pep_cores_mapping.csv ${ prefix} .csv
31- mv length_distributions.html epicore_length_distribution.html
32- mv epitope_intensity_hist.html epicore_intensity_histogram.html
33-
34- wc -l < epitopes.csv | awk '{print \$ 1 - 1}' > epicores.txt
35-
36- awk 'NR==1 {print \$ 0 ",# Epicores"; next} NR==2 {getline extra < "epicores.txt"; print \$ 0 "," extra}' $general_stats > _modified_$general_stats
37- cat <<-END_VERSIONS > versions.yml
38- "${ task.process} ":
39- epicore: \$ (epicore --version | grep 'epicore' | cut -d ' ' -f3)
40- END_VERSIONS
41- """
42-
43- stub:
44- def args = task. ext. args ?: ' '
45- def prefix = task. ext. prefix ?: " ${ meta.id} "
46- """
47- touch ${ prefix} _general_stats.csv
48- touch ${ meta.id} _epicore.csv
49- touch length_distributions.html
50- touch epitope_intensity_hist.html
51- cat <<-END_VERSIONS > versions.yml
52- "${ task.process} ":
53- epicore: \$ (epicore --version | grep 'epicore' | cut -d ' ' -f3)
54- END_VERSIONS
55- """
56- }
2+ tag " $meta . id "
3+ label ' process_high'
4+
5+ conda " bioconda::epicore=0.1.5"
6+ container " ${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7+ 'https://depot.galaxyproject.org/singularity/epicore:0.1.5--pyhdfd78af_0' :
8+ 'biocontainers/epicore:0.1.5--pyhdfd78af_0' } "
9+
10+ input:
11+ tuple val(meta_fasta), path(fasta)
12+ path(quantification_tsv)
13+ path(general_stats)
14+ val(meta)
15+
16+ output:
17+ path " *_general_stats.csv" , emit: stats
18+ path " ${ meta.id} .csv" , emit: final_epicore_tsv
19+ path " epicore_length_distribution.html" , emit: length_dist
20+ path " epicore_intensity_histogram.html" , emit: intensity_hist
21+ path " versions.yml" , emit: versions
22+
23+ script:
24+ def args = task. ext. args ?: ' '
25+ def prefix = task. ext. prefix ?: " ${ meta.id} "
26+ """ #!/bin/bash
27+
28+ epicore --reference_proteome $fasta --out_dir . generate-epicore-csv $args --evidence_file $quantification_tsv --html
29+
30+ mv pep_cores_mapping.csv ${ prefix} .csv
31+ mv length_distributions.html epicore_length_distribution.html
32+ mv epitope_intensity_hist.html epicore_intensity_histogram.html
33+
34+ wc -l < epitopes.csv | awk '{print \$ 1 - 1}' > epicores.txt
35+
36+ awk 'NR==1 {print \$ 0 ",# Epicores"; next} NR==2 {getline extra < "epicores.txt"; print \$ 0 "," extra}' $general_stats > _modified_$general_stats
37+ cat <<-END_VERSIONS > versions.yml
38+ "${ task.process} ":
39+ epicore: \$ (epicore --version | grep 'epicore' | cut -d ' ' -f3)
40+ """
41+
42+ stub:
43+ def args = task. ext. args ?: ' '
44+ def prefix = task. ext. prefix ?: " ${ meta.id} "
45+ """
46+ touch ${ prefix} _general_stats.csv
47+ touch ${ meta.id} _epicore.csv
48+ touch length_distributions.html
49+ touch epitope_intensity_hist.html
50+ cat <<-END_VERSIONS > versions.yml
51+ "${ task.process} ":
52+ epicore: \$ (epicore --version | grep 'epicore' | cut -d ' ' -f3)
53+ END_VERSIONS
54+ """
55+ }
0 commit comments