forked from nextflow-io/nfcamp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rnaseq-processes.nf
68 lines (51 loc) · 1.06 KB
/
rnaseq-processes.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
process index {
tag "$transcriptome.simpleName"
input:
path transcriptome
output:
path 'index'
script:
"""
salmon index --threads $task.cpus -t $transcriptome -i index
"""
}
process quant {
tag "$pair_id"
input:
path index
tuple pair_id, path(reads)
output:
path pair_id
script:
"""
salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id
"""
}
process fastqc {
tag "FASTQC on $sample_id"
publishDir params.outdir
input:
tuple sample_id, path(reads)
output:
path "fastqc_${sample_id}_logs"
script:
"""
mkdir fastqc_${sample_id}_logs
fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads}
"""
}
process multiqc {
publishDir params.outdir, mode:'copy'
errorStrategy 'ignore'
input:
path 'data*/*'
path config
output:
path 'multiqc_report.html'
script:
"""
cp $config/* .
echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml
multiqc -v .
"""
}