forked from superphy/ont-nextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
method1.nf
34 lines (26 loc) · 1.1 KB
/
method1.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
#!/usr/bin/env nextflow
/*
example usage:
nextflow run method1.nf --target examplerun --move true
*/
nextflow.enable.dsl = 2
// Params
params.target = "examplerun" // run to do analysis workflow on
params.move = false // whether or not the original files have to be moved from minION to NAS
params.datadir = "/mnt/NAS/nanopore_runs/" // location of the raw/original run files
params.outdir = "$HOME/jantest/method1/" // location to collect all output/results
params.publishdir = "${params.outdir}${params.target}/" // location to save files for the current target
// Subworkflows
include { MOVEFILES } from './subworkflow/movefiles'
include { CONCAT_RAW_FASTQ } from './subworkflow/concat_raw_fastq'
workflow {
// If required, move the original output from the MinIONs to the NAS
// Concatenate all of the passed fastq files into one
if (params.move == true) {
MOVEFILES(params.datadir, params.target)
CONCAT_RAW_FASTQ(MOVEFILES.out, params.publishdir)
}
else {
CONCAT_RAW_FASTQ(params.datadir, params.target, params.publishdir)
}
}