-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
61 lines (51 loc) · 2.56 KB
/
Copy pathmain.nf
File metadata and controls
61 lines (51 loc) · 2.56 KB
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
#!/usr/bin/env nextflow
//
// nf-seabed-symphony
// Nextflow implementation of the seabed-symphony marine metagenomics /
// BGC-discovery pipeline.
//
// Currently implemented:
// Workflow 1 — Preprocessing & Quality Control
// Workflow 2 — Metagenome Assembly & Annotation
//
// Planned:
// Workflow 3 — Genome Binning & Quality Assessment
// Workflow 4 — BGC Detection & Functional Analysis
//
include { PREPROCESSING_QC } from './workflows/preprocessing_qc'
include { ASSEMBLY_ANNOTATION } from './workflows/assembly_annotation'
workflow {
if ( !params.input ) {
error """
No input given. Provide long-read FASTQ files with --input, e.g.
nextflow run main.nf -profile conda --input 'data/*.fastq.gz'
Or run the bundled smoke test:
nextflow run main.nf -profile conda,test
""".stripIndent()
}
// ── Input channel ────────────────────────────────────────────────────────
// One FASTQ per sample. `single_end: true` is required by the nf-core
// FILTLONG module even though no short reads are supplied.
ch_reads = Channel
.fromPath( params.input, checkIfExists: true )
.map { fastq -> [ [ id: fastq.simpleName, single_end: true ], fastq ] }
// ── Workflow 1 ───────────────────────────────────────────────────────────
PREPROCESSING_QC ( ch_reads )
// ── Workflow 2 ───────────────────────────────────────────────────────────
// Assembly is expensive; --skip_assembly stops after QC.
if ( !params.skip_assembly ) {
ASSEMBLY_ANNOTATION ( PREPROCESSING_QC.out.reads )
}
// ── Software versions ────────────────────────────────────────────────────
// Every module publishes to the `versions` topic. Collect the whole set
// once here and write a single reproducibility record.
Channel.topic( 'versions' )
.map { process, name, version -> "${name}: ${version}" }
.unique()
.collectFile(
name : 'software_versions.yml',
storeDir : "${params.outdir}/pipeline_info",
newLine : true,
sort : true
)
}