-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
138 lines (116 loc) · 5.36 KB
/
nextflow.config
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
params.qc = "fastp" // Available Options: fastp, TrimGalore, FastQC (requires own trimming)
params.mapping = "star" // Available Options: hisat2, star
params.assembly = ["Trinity","rnaspades"] // Available Options (choose multiple): STAR, Trinity, RNAspades,
params.quantification = "featureCounts" // Available Options: featureCounts (none other available at the moment)
params.trinity_type="guided" // Available options: guided, denovo
// Whether or not to publish directories to allow them to be viewed (mainly for debugging files)
PUBLISH_DIRECTORIES = 0
// Set some global variables which require linux-based commands. Can also set manually if these are known prior
params {
USER_ID = "id -u".execute().text.trim() // current user ID needed for mapping directories
GROUP_ID = "id -g".execute().text.trim() // current group ID needed for mapping directories
input_dir = ''; // (Top-level) folder in which reads are kept
output_dir = "./workflow_output"; // Where to publish files i.e VCFs, CSV's
reference_dir = ""; // Where to publish files i.e VCFs, CSV's
reference_file = '${reference_dir}/*.{fa,fasta}'; // The reference genome
gff_file = '${reference_dir}/*.{}'; // The annotation for the reference genome
repeats = '';
mirna_mature = '';
num_threads = 4;
max_memory = '50.GB';
star_index = '';
hisat_index = '';
known_sites = '';
star_two_pass = false; // Useful for splice/isoform analysis, otherwise no
// Either give samplesheet or define r1/r2 pattern
paired = false; // Whether paired data is given
samplesheet = null;
strandedness = "reverse"
r1_pattern = "_R1" // Pattern for Read1 files (for paired-end)
r2_pattern = "_R2" // Pattern for Read2 files (for paired-end)
}
// https://github.com/nextflow-io/nextflow/issues/2786
profiles {
singularity {
dag.overwrite = true
singularity.enabled = true
singularity.autoMounts = true
singularity.runOptions = '-B $SINGULARITY_TMPDIR:/tmp --no-mount /nfs/wsi/it/posth' // -B $SINGULARITYENV_TMPDIR:/tmp
singularity.envWhitelist = ['SINGULARITY_TMPDIR', 'APPTAINERENV_TMPDIR', 'SINGULARITYENV_TMPDIR']
executor {
name = 'slurm'
queueSize = 20 // This multiplied by `cpus` could control max #CPUs at one time
pollInterval = '30 sec'
submitRateLimit = '50/1min'
}
process {
// Labels to take into consideration: storeDir
container = 'file://clint.sif'
cpus = 5 // General amount for CPUs
cache = 'lenient' // Important for shared file systems
queue = 'short' // default queue - usually one of the shorter ones
withLabel: preprocess {
// maxForks = 10 // If not SLURM executor
queue = 'short'
memory = 10.GB
}
withLabel: mapping {
// maxForks = 5 // If not SLURM executor
queue = 'short'
memory = 20.GB
}
withLabel: assembly {
// maxForks = 6 // If not SLURM executor
queue = 'long'
memory = 50.GB
}
withLabel: variant_calling {
errorStrategy = 'retry' // For gatk-related processes
maxRetries = 3 // For gatk-related processes
queue = 'long'
memory = 40.GB
}
// These are processes such as Mutect2 which due to
// the inverval-scattering approach create lot of
// forks - limit these
withLabel: forking_heavy {
maxForks = 15
}
withName: 'Mutect2' {
maxForks = 15
}
// This should be done quickly and once (only) hopefully
withName: STAR_BUILD {
cpus = 10
memory = 50.GB
}
withName: STAR_CIRCRNA_CIRCTOOLS {
queue = "long"
}
// These dont need that much regarding cpu usage
withName: 'SAMTOOLS_INDEX|SAMTOOLS_SORT' {
cpus = 2
memory = 50.GB
}
withName: DCC {
cpus = 8
memory = 20.GB
}
withName: ANNOTATE {
container = ""
}
}
}
docker {
// Causes errors when doing 'publishDir' related stuff due to permissions
docker.enabled = true
docker.temp = 'auto'
process {
container = 'file://clint.sif'
cpus = 4 // Default #cpus to use
withName: HISAT2 {
cpus = 6
}
}
}
}