-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextflow.config
125 lines (108 loc) · 4.21 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
// Config inheritance options
params {
generic_config_base = "https://raw.githubusercontent.com/sanger-pathogens/nextflow-commons/"
generic_config_version = "master"
generic_config_url = ""
}
manifest {
name = 'long-read-ampliseq'
author = 'PAM Informatics'
homePage = 'https://gitlab.internal.sanger.ac.uk/sanger-pathogens/pipelines/long-read-ampliseq'
description = 'AmpliSeq analysis pipeline for STI and epidemic pathogens from long reads'
mainScript = 'main.nf'
nextflowVersion = '>=21.04.0'
version = 'v0.0.1'
}
params {
// Basecalling
basecall = "true"
basecall_model = "[email protected]"
basecall_model_path = ""
//this is default anyways but allows for changing
trim_adapters = "all"
barcode_kit_name = ["SQK-NBD114-24"] //https://github.com/nanoporetech/dorado/issues/625
read_format = "fastq"
dorado_local_path = ""
// Save output files
// TODO Make all the file retaining names consistent!
keep_sorted_bam = true
keep_bam_files = false
save_fastqs = true
save_trimmed = true
save_too_short = true
save_too_long = true
// QC
qc_reads = true
min_qscore = 9
cutadapt_args = "-e 0.15 --no-indels --overlap 18"
lower_read_length_cutoff = 450
upper_read_length_cutoff = 800
coverage_reporting_thresholds = "1,2,8,10,25,30,40,50,100"
coverage_filtering_threshold = "25"
multiqc_config = ""
// Reference files
reference = "/data/pam/team216/mb29/scratch/Treponema/Treponema_References/NC_021508.1.mask-Ribosomal-Operon2.fasta"
raw_read_dir = "/lustre/scratch126/pam/teams/team230/sd28/long-read-ampliseq/pod5"
primers = "/data/pam/team216/mb29/scratch/Treponema/TP_Discriminatory_sites_2021/MinION_Lab_Testing/binding_sites/TP-Discriminatory-primers.20230208_23S-v1.fas"
target_regions_bed = "/data/pam/team230/wr7/scratch/tmp/ampliseq_pipeline/fixed.bed"
additional_metadata = "/lustre/scratch126/pam/teams/team230/sd28/long-read-ampliseq/metadata/sample_to_barcode.csv"
// Variant calling
clair3_model = "/lustre/scratch126/pam/teams/team230/sd28/long-read-ampliseq/clair3_model/r1041_e82_400bps_hac_v430"
clair3_min_coverage = "5"
remove_recombination = false
raxml_base_model = 'GTR+G4'
raxml_threads = 2
masking_quality = 15
// Consensus curation
min_ref_gt_qual = 1
min_alt_gt_qual = 1
// LSF options
queue_size = 50
submit_rate_limit = '50/2min'
monochrome_logs = false
}
// to add to nextflow.commons
process {
withLabel:gpu {
//forms the resource from other labels
clusterOptions = { "-M " + task.memory.toMega() + " -R 'select[ngpus>0] span[ptile=1]' -gpu 'num=1:mode=shared:gmem=" + task.memory.toMega() * 2 + "'" }
queue = { task.time > 48.h ? 'gpu-basement' : task.time > 12.h ? 'gpu-huge' : 'gpu-normal' }
// need to set --nv to enable GPU's to be used
containerOptions = {
workflow.containerEngine == "singularity" ? '--containall --cleanenv --nv':
( workflow.containerEngine == "docker" ? '--gpus all': null )
}
}
}
profiles {
standard {
inherit_generic_config()
}
docker {
inherit_generic_config()
}
singularity {
inherit_generic_config()
}
conda {
inherit_generic_config()
}
laptop {
includeConfig "./config/nextflow-commons/common.config"
docker.enabled = true
params.dorado_local_path = "/Users/Shared/ampliseq/dorado-0.7.1-osx-arm64/bin/dorado"
params.basecall_model_path = "/Users/Shared/ampliseq/[email protected]"
params.clair3_model = "/Users/Shared/ampliseq/r1041_e82_400bps_hac_v430"
}
}
// Helper functions
def inherit_generic_config() {
config_url = params.generic_config_url ? params.generic_config_url : "${params.generic_config_base}/${params.generic_config_version}/configs/nextflow.config"
try {
includeConfig "${config_url}"
} catch (Exception e) {
System.err.println("ERROR: Could not load generic config: ${config_url}")
System.err.println("Encountered the following exception:")
throw e
}
}