-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
108 lines (96 loc) · 3.76 KB
/
Copy pathnextflow.config
File metadata and controls
108 lines (96 loc) · 3.76 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Load processes parameters
includeConfig 'configs/base.config'
//includeConfig 'configs/input.config'
//includeConfig 'configs/onco-ref.config'
params {
// Workflow flags:
// Mandatory arguments
def run_name = params.run_name
def runid = params.runid
def ref_dir = "${launchDir}/data/wuhan_ref"
metadir = "${launchDir}/data/meta_info"
samplesheetBCL = "${metadir}/${run_name}_sample_sheet.csv"
samplesheetmeta = "${metadir}/${run_name}_meta_sheet.csv"
inputfastq = "${launchDir}/data/${params.run_name}/*_R{1,2}_001.fastq.gz"
outdir = "${launchDir}/data/${params.run_name}/results"
wuhan_ref = "${ref_dir}/wuhan_trim3polyA.fasta"
genome_gff = "${ref_dir}/GCF_009858895.2_ASM985889v3_genomic.gff"
// Main options
publish_dir_mode = 'copy'
no_intervals = false // Intervals will be built from the fasta file
nucleotides_per_second = 1000 // Default interval size
tools = null // No default Variant_Calling or Annotation tools
skip_tools = null // All tools (markduplicates + baserecalibrator + QC) are used by default
split_fastq = 50000000 // FASTQ files will not be split by default by FASTP
// Modify fastqs (trim/split) with FASTP
trim_fastq = true // No trimming
clip_r1 = 0
clip_r2 = 0
three_prime_clip_r1 = 0
three_prime_clip_r2 = 0
trim_nextseq = 0
save_trimmed = false
save_split_fastqs = false
//Modify the alignment with BOWTIE2
save_unaligned = false
skip_variants = false
min_mapped_reads = 1000
}
profiles {
conda {
params.enable_conda = true
charliecloud.enabled = false
docker.enabled = false
podman.enabled = false
shifter.enabled = false
singularity.enabled = false
}
docker {
docker.enabled = true
//docker.userEmulation = { params.use_gatk_spark ? false : true }.call()
charliecloud.enabled = false
podman.enabled = false
shifter.enabled = false
singularity.enabled = false
}
singularity {
singularity.autoMounts = true
singularity.enabled = true
charliecloud.enabled = false
docker.enabled = false
podman.enabled = false
shifter.enabled = false
}
}
// Function to ensure that resource requirements don't go beyond
// a maximum limit
def check_max(obj, type) {
if (type == 'memory') {
try {
if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else
return obj
} catch (all) {
println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'time') {
try {
if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else
return obj
} catch (all) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'cpus') {
try {
return Math.min( obj, params.max_cpus as int )
} catch (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}