-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
173 lines (134 loc) · 4.38 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
manifest {
name = 'CompGenLabUB/CAPTVRED'
author = 'Maria Tarradas-Alemany <mtarradasi@ub.edu>;Josep F Abril Ferrando <jabril@ub.edu>'
description = 'Pipeline for analyses of viral metagenomics datasets from Target Enrichment Sequencing.'
version = '1.0.0'
mainScript = 'main.nf'
nextflowVersion = '>=22.04.5'
}
params{
//environment parameters:
//help
help = false
conda.enabled = true
// init params
// working directory
samp = null // Sample definition tabular filef
fastq_dir = null // Directory for target species data
runID = null // "RUN00"
R1 = "_R1_001"
R2 = "_R2_001"
setname = "targetset"
// refseqs and databases
refdb_name = "rvdb_nt"
set_seqs = "setseqs.fasta.gz" // Fasta file for set species is stores (full path)
fams_subset = "foi_subset_db.fasta.gz" //subset of rvdb conaining only
others_subset = "other_subset_db.fasta.gz"
full_tax = "full_tax.tax.gz"
set_tax = "set_tax.tax.gz"
use_full_db = params.use_full_db?:false
amplicon_refseqs_dir = null //params.refseqs+'/ampliconseqs'
amplicon_refseqs_info = "Viral_candidates_zoonosis_full_info.tsv"
rawfq_sfx="{$R1,$R2}.{fastq,fq}.gz"
// sampletbl= params.basedir+'/samples_definition.tbl'
//
NCPUS=32
// MAXMEM="$MAXMEM"
// phred="$PhredOffset"up
// Cleaning params (BBDuk):
trim_adapters = true
// bbdukREF="${params.refseqs}/bbmap/resources/adapters.fa"
bbdukMINLEN=32
bbdukMAQ=10
// BOWTIE and Alignment params:
alignMINQ=13
bowtie_nmismatch=1
bowtie_seedlen=18
// Assembly params:
assembler="megahit"
assemblyMINCONLEN=100;
trinityMAXM="250G"
megahit_errorHandler = "finish"
// Taxonomy
//taxonfast = false
//taxonslow = false
taxalg="BLASTN"
// Blast params:
// blast_approach="BLASTN"
// blast_ref_db_name="C-RVDBvCurrent_blastdb"
// blast_ref_db_name="$BL_DB_NM"
//"C-RVDBvCurrent_blastdb"
// blast_ref_db_ids="$BDBD_IDS"
// blast_ref_db_info="C-RVDB_allentries_info.txt"
blast_eval=10e-10
blast_pident=50
taxondbsize=5000000000 // about 2 times db size (2428170463)
// ON REFERENCES (SET)
// general_only = false
// Blast against Viral Candidates (vcan)
bl_suffix="blastn_on_viralcandidates"
vcan_eval=0.001
vcan_pident=50
// do not modify! //
bl_outfmt="6 qseqid qlen sseqid slen qstart qend sstart send"
bl_outfmt="${bl_outfmt} length score evalue bitscore pident"
bl_outfmt="${bl_outfmt} nident mismatch positive gapopen gaps"
bl_outfmt="${bl_outfmt} ppos qframe sframe qcovs qcovhsp qseq sseq"
// do not modify! //
// Kaiju Params:
kaijumaxCPUS=26
kaijuMAX_FORKS=4
kaijuMAX_RETRIES=2
kaijuDBRAW="nr_euk" // database for kaiju into raw reads
// Filter params:
mincovpct=70
// Handle Contamination:
handle_contamination = params.handle_contamination?:false
cont_min_cov=100;
// if (handle_contamination == true ) {
// cids="$contamin_ids";
// cfaa="$contamin_faa";
// }
//Coverage figures
do_cov_figures == true
}
process {
withName: '*' {
conda = '$baseDir/environment.yml'
}
withLabel: 'trinity_crash' {
errorStrategy = 'ignore'
}
withLabel: 'megahit_crash' {
errorStrategy = params.megahit_errorHandler
}
withLabel: 'limit_kaiju' {
errorStrategy = 'retry'
maxRetries = params.kaijuMAX_RETRIES
maxForks = params.kaijuMAX_FORKS
if ( params.NCPUS < params.kaijumaxCPUS ) {
cpus=params.NCPUS
} else {
cpus=params.kaijumaxCPUS }
}
}
env {
//Fixing issues with python utf8 libraries
LANG = "en_US.UTF-8"
LC_CTYPE = "en_US.UTF-8"
LC_NUMERIC = "en_US.UTF-8"
LC_TIME = "en_US.UTF-8"
LC_COLLATE = "en_US.UTF-8"
LC_MONETARY = "en_US.UTF-8"
LC_MESSAGES = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
// Kaiju params
//kaiju_dbs="viruses, rvdb, refseq, nr_euk"
//Further defs
//BP_LOG = "$BDIR/logs/biopieces"
BPCOL = 'SEQ_NAME,SEQ_LEN,RES[A],RES[C],RES[G],RES[T],GC%'
BPCOL = "$BPCOL,SCORES_MIN,SCORES_MAX,SCORES_MEAN,SCORES_MEDIAN"
TAB = "\t"
RET = "\n"
ZERO="###0###"
}