-
Notifications
You must be signed in to change notification settings - Fork 2
/
candida_auris_isolate_illumina_polish.nf
72 lines (59 loc) · 2.53 KB
/
candida_auris_isolate_illumina_polish.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
69
70
71
72
/*
* Candida auris WGS pipeline
* ==========================
*/
/*
* Sequence QC
* ===========
*/
include { ILLUMINA_FASTP } from './modules/quality_control'
include { ILLUMINA_FASTQC } from './modules/quality_control'
include { ILLUMINA_SEQKIT_STATS as ILLUMINA_SEQKIT_STATS_BEFORE } from './modules/quality_control'
include { ILLUMINA_CHECK_DEPTH } from './modules/assembly'
/*
* Genome assembly
* ===============
*/
include { PILON } from './modules/assembly'
include { CLEANUP_CONSENSUS as CLEANUP_CONSENSUS_HYBRID_PILON } from './modules/assembly'
include { QUAST_HYBRID } from './modules/assembly'
/*
* Logging
* =======
*/
log.info """\
C. auris WGS PIPELINE
==========================
nanopore_contigs : ${params.nanopore_contigs}
nanopore_read_for_downstream_ch : ${params.nanopore_reads}
ilumina_reads_1 : ${params.illumina_reads_1}
ilumina_reads_2 : ${params.illumina_reads_2}
outdir : ${params.outdir}
"""
.stripIndent()
workflow {
// Input files
// ===========
nanopore_read_for_downstream_ch = Channel.fromPath(params.nanopore_reads, checkIfExists: true)
nanopore_contig_ch = Channel.fromPath(params.nanopore_contigs, checkIfExists: true)
read_ch1 = Channel.fromPath(params.illumina_reads_1, checkIfExists: true)
read_ch2 = Channel.fromPath(params.illumina_reads_2, checkIfExists: true)
// Adapter trimming and sequencing QC
// ==================================
(fastp_json, fastp_html, read_trim_qc_ch1, read_trim_qc_ch2) = ILLUMINA_FASTP(read_ch1, read_ch2)
ILLUMINA_FASTQC(read_trim_qc_ch1, read_trim_qc_ch2)
// Decontamination
// ===============
illumina_stats_ch = ILLUMINA_SEQKIT_STATS_BEFORE(read_trim_qc_ch1, read_trim_qc_ch2, "no_decont")
// Subsampling reads to a specific depth
// =====================================
(illumina_check_depth_log, read_for_downstream_ch1, read_for_downstream_ch2) = ILLUMINA_CHECK_DEPTH(read_trim_qc_ch1, read_trim_qc_ch2, illumina_stats_ch)
// Genome polishing
// ===============================
(pilon_ch, pilon_change_ch) = PILON(nanopore_contig_ch, read_for_downstream_ch1, read_for_downstream_ch2)
// Assembly QC with QUAST
nanopore_quast_ch = QUAST_HYBRID(pilon_ch, nanopore_read_for_downstream_ch, read_for_downstream_ch1, read_for_downstream_ch2, "hybrid.pilon")
}
workflow.onComplete {
log.info ( workflow.success ? "\nDone! Check the result at $params.outdir\n" : "Oops .. something went wrong" )
}