-
Notifications
You must be signed in to change notification settings - Fork 1
/
fastqc_multi.nf
64 lines (51 loc) · 1.7 KB
/
fastqc_multi.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
#!/usr/bin/env nextflow
// This script is part of the Bifrost pipeline. Please see
// the accompanying LICENSE document for licensing issues,
// and the WIKI for this repo for instructions.
// Which version do we have?
//if (workflow.commitId) {
version = "v0.2.0 ${workflow.repository} - ${workflow.revision} [${workflow.commitId}]"
//}
//else {
// version = "v0.2.0 local"
//}
log.info ''
log.info "================================================="
log.info " Bifrost quality assessment module, version ${version}"
log.info "================================================="
log.info "Reads : ${params.reads}"
log.info "#files in read set : ${params.setsize}"
log.info "Results can be found in : ${params.out_dir}"
log.info "================================================="
log.info ""
// First, define the input data that go into input channels
Channel
.fromFilePairs( params.reads, size:params.setsize )
.ifEmpty { error "Cannot find any reads matching: ${params.reads}" }
.set{fastqc_reads}
// Second is to send all of through fastqc
process run_fastqc {
publishDir "${params.out_dir}/${params.fastqc}", mode: "${params.savemode}"
tag {pair_id}
label 'one'
input:
set pair_id, file(reads) from fastqc_reads
output:
file "$pair_id" into fastqc_results
"""
mkdir ${pair_id}
fastqc -q ${reads} -o ${pair_id} -t $task.cpus
"""
}
process run_multiqc {
publishDir "${params.out_dir}/multiqc", mode: "${params.savemode}"
tag {"multiqc"}
label 'one'
input:
file "fastqc_output/*" from fastqc_results.toSortedList()
output:
file "multiqc_report.html" into multiqc_report
"""
multiqc fastqc_output
"""
}