Skip to content

Commit de49094

Browse files
committed
updated nextflow.config
1 parent 1130fde commit de49094

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

nextflow.config

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ params {
1414
fasta_exts = ['*.fa', '*.fasta', '*.fna']
1515
fasta_search_path = makeFastaSearchPath(fasta_exts)
1616
fasta_input = 'NO_FILE'
17-
run_name = "default"
17+
run_name = parseRunName( fasta_input )
1818
samplesheet_input = 'NO_FILE'
1919
databases = 'NO_FILE'
2020
no_db_metadata = false
@@ -35,6 +35,16 @@ def makeFastaSearchPath (fasta_exts) {
3535
return fasta_search_path
3636
}
3737

38+
// this uses a regex invocation using the =~ to pull out the folder name
39+
def parseRunName ( fasta_input ) {
40+
run_name = (params.fasta_input =~ /([^\/]+)\/?$/)[0][1]
41+
if (!run_name) {
42+
throw new RuntimeException("ERROR: Parsing run name from FASTQ path failed.")
43+
}
44+
return run_name
45+
}
46+
47+
3848
def parseMinorVersion(version) {
3949
minor_version = version.split('\\.')[0..1].join('.')
4050
return minor_version
@@ -59,5 +69,19 @@ process {
5969
withName: blastn {
6070
shell = ['/bin/bash', '-uo','pipefail' ]
6171
}
72+
}
73+
74+
report {
75+
enabled = true
76+
file = "${params.outdir}/${params.run_name}_its-nf_nextflow_report.html"
77+
}
78+
79+
timeline {
80+
enabled = true
81+
file = "${params.outdir}/${params.run_name}_its-nf_nextflow_timeline.html"
82+
}
6283

84+
trace {
85+
enabled = true
86+
file = "${params.outdir}/${params.run_name}_its-nf_nextflow_trace.txt"
6387
}

0 commit comments

Comments
 (0)