Skip to content
This repository was archived by the owner on May 7, 2019. It is now read-only.

Commit 123eb33

Browse files
author
Alexander Peltzer
committed
Add tracedir
1 parent 95f705b commit 123eb33

5 files changed

Lines changed: 76 additions & 49 deletions

File tree

PairedSingleSampleWF.nf

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,9 @@ Output:
4343
--outdir Path where the results to be saved [Default: './results']
4444
4545
Kit files:
46+
--kitfiles Path to kitfiles defined in metafiles.config
47+
--metafiles Path to metafiles defined in metafiles.config
4648
--kit Kit used to prep samples [Default: 'agilent_v5']
47-
--bait Absolute path to bait file
48-
--target Absolute path to target file
49-
--target_bed Absolute path to target bed file (snpEff compatible format)
50-
51-
Genome/Variation files:
52-
--dbsnp Absolute path to dbsnp file
53-
--thousandg Absolute path to 1000G file
54-
--mills Absolute path to Mills file
55-
--omni Absolute path to Omni file
56-
--gfasta Absolute path to genome fasta file
57-
--bwa_index Absolute path to bwa genome index
58-
59-
Other options:
60-
--exome Exome data, if this is not set, run as genome data
61-
--project Uppnex project to user for SLURM executor
6249
6350
For more detailed information regarding the parameters and usage refer to package
6451
documentation at https://github.com/nf-core/ExoSeq
@@ -69,9 +56,7 @@ params.name = false
6956
params.help = false
7057
params.reads = false
7158
params.singleEnd = false
72-
params.genome = false
7359
params.run_id = false
74-
params.exome = false //default genome, set to true to run restricting to exome positions
7560
params.aligner = 'bwa' //Default, but stay tuned for later ;-)
7661
params.saveReference = true
7762

@@ -91,24 +76,14 @@ params.three_prime_clip_r2 = 0
9176

9277
// Kit options
9378
params.kit = 'agilent_v5'
94-
params.bait = params.kitFiles[ params.kit ] ? params.kitFiles[ params.kit ].bait ?: false : false
95-
params.target = params.kitFiles[ params.kit ] ? params.kitFiles[ params.kit ].target ?: false : false
96-
params.target_bed = params.kitFiles[ params.kit ] ? params.kitFiles[ params.kit ].target_bed ?: false : false
97-
params.dbsnp = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].dbsnp ?: false : false
98-
params.thousandg = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].thousandg ?: false : false
99-
params.mills = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].mills ?: false : false
100-
params.omni = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].omni ?: false : false
101-
params.gfasta = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].gfasta ?: false : false
102-
params.bwa_index = params.metaFiles[ params.genome ] ? params.metaFiles[ params.genome ].bwa_index ?: false : false
10379

10480
// Has the run name been specified by the user?
105-
// this has the bonus effect of catching both -name and --name
81+
// this has the bonus effect of catching both -name and --name
10682
custom_runName = params.name
10783
if( !(workflow.runName ==~ /[a-z]+_[a-z]+/) ){
10884
custom_runName = workflow.runName
10985
}
11086

111-
11287
// Show help when needed
11388
if (params.help){
11489
log.info helpMessage
@@ -119,14 +94,12 @@ if (params.help){
11994
if (!params.reads || !params.genome){
12095
exit 1, "Parameters '--reads' and '--genome' are required to run the pipeline"
12196
}
122-
if (!params.kitFiles[ params.kit ] && ['bait', 'target'].count{ params[it] } != 2){
123-
exit 1, "Kit '${params.kit}' is not available in pre-defined config, so " +
124-
"provide all kit specific files with option '--bait' and '--target'"
97+
if (!params.kitfiles){
98+
exit 1, "No Exome Capturing Kit specified!"
99+
}
100+
if (!params.metafiles){
101+
exit 1, "No Exome Metafiles specified!"
125102
}
126-
if (!params.metaFiles[ params.genome ] && ['gfasta', 'bwa_index', 'dbsnp', 'thousandg', 'mills', 'omni'].count{ params[it] } != 6){
127-
exit 1, "Genome '${params.genome}' is not available in pre-defined config, so you need to provide all genome specific " +
128-
"files with options '--gfasta', '--bwa_index', '--dbsnp', '--thousandg', '--mills' and '--omni'"
129-
}
130103

131104
// Create a channel for input files
132105

@@ -137,7 +110,6 @@ Channel
137110

138111

139112
// Validate Input indices for BWA Mem and GATK
140-
141113
if(params.aligner == 'bwa' ){
142114
bwaId = Channel
143115
.fromPath("${params.gfasta}.bwt")
@@ -150,8 +122,7 @@ def summary = [:]
150122
summary['Run Name'] = custom_runName ?: workflow.runName
151123
summary['Reads'] = params.reads
152124
summary['Data Type'] = params.singleEnd ? 'Single-End' : 'Paired-End'
153-
summary['Genome'] = params.genome
154-
summary['WES/WGS'] = params.exome ? 'WES' : 'WGS'
125+
summary['Genome Assembly'] = params.genome
155126
summary['Trim R1'] = params.clip_r1
156127
summary['Trim R2'] = params.clip_r2
157128
summary["Trim 3' R1"] = params.three_prime_clip_r1
@@ -178,7 +149,6 @@ summary['Config Profile'] = workflow.profile
178149
log.info summary.collect { k,v -> "${k.padRight(15)}: $v" }.join("\n")
179150
log.info "========================================="
180151

181-
182152
try {
183153
if( ! workflow.nextflow.version.matches(">= $params.nf_required_version") ){
184154
throw GroovyException('Nextflow version too old')

conf/metafiles.config

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
genomes {
3+
'GRCh37' {
4+
gfasta = '${params.metafiles}/b37/human_g1k_v37.fasta'
5+
bwa_index = '${params.metafiles}/b37/human_g1k_v37.fasta.bwt'
6+
dbsnp = '${params.metafiles}/b37/dbsnp_138.b37.vcf'
7+
mills = '${params.metafiles}/b37/Mills_and_1000G_gold_standard.indels.b37.vcf'
8+
omni = '${params.metafiles}/b37/1000G_omni2.5.b37.vcf'
9+
thousandg = '${params.metafiles}/b37/1000G_phase1.snps.high_confidence.b37.vcf'
10+
kits {
11+
'agilent_v5' {
12+
bait = '${params.kitfiles}/agilent_v5/S04380110_Regions.interval_list'
13+
target = '${params.kitfiles}/agilent_v5/S04380110_Covered.interval_list'
14+
target_bed = '${params.kitfiles}/agilent_v5/S04380110_Covered.bed'
15+
}
16+
}
17+
}
18+
}

conf/test.config

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* -------------------------------------------------
3+
* Nextflow config file for running tests
4+
* -------------------------------------------------
5+
* Defines bundled input files and everything required
6+
* to run a fast and simple test. Use as follows:
7+
* nextflow run nf-core/rnaseq -profile test
8+
*/
9+
10+
params {
11+
max_cpus = 2
12+
max_memory = 6.GB
13+
max_time = 48.h
14+
// Input data
15+
singleEnd = false
16+
kitfiles = './kits'
17+
readPaths = [
18+
['Testdata_R1', ['https://github.com/nf-core/test-datasets/raw/exoseq/testdata/Testdata_R1.tiny.fastq.gz']],
19+
['Testdata_R2', ['https://github.com/nf-core/test-datasets/raw/exoseq/testdata/Testdata_R2.tiny.fastq.gz']],
20+
]
21+
// Genome references
22+
fasta = 'https://github.com/nf-core/test-datasets/raw/exoseq/reference/human_g1k_v37_decoy.small.fasta'
23+
}

environment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# You can use this file to create a conda environment for this pipeline:
22
# conda env create -f environment.yml
3-
name: nfcore-exoseq-0.9dev
3+
name: nfcore-exoseq-1.0dev
44
channels:
55
- bioconda
66
- conda-forge
@@ -11,7 +11,7 @@ dependencies:
1111
- bwa=0.7.17
1212
- fastqc=0.11.7
1313
- trim-galore=0.4.5
14-
- samtools=1.8
15-
- gatk4=4.0.3.0
14+
- samtools=1.9
15+
- gatk4=4.0.4.0
1616
- qualimap=2.2.2a
17-
- multiqc=1.5
17+
- multiqc=1.6

nextflow.config

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111

1212
params {
1313
outdir = './results'
14-
version = '0.9dev'
15-
nf_required_version = '0.27.6'
14+
version = '1.0dev'
15+
nf_required_version = '0.30.2'
1616
container = 'nfcore/exoseq'
17+
metafiles = './references'
18+
kitfiles = './kitfiles'
19+
tracedir = "${params.outdir}/pipeline_info"
1720
}
1821

1922

@@ -35,21 +38,34 @@ profiles {
3538
uppmax {
3639
includeConfig 'conf/uppmax.config'
3740
}
41+
test {
42+
includeConfig 'conf/base.config'
43+
includeConfig 'conf/test.config'
44+
includeConfig 'conf/metafiles.config'
45+
}
3846
}
3947

4048
// Capture exit codes from upstream processes when piping
41-
process.shell = ['/bin/bash','-euo', 'pipefail']
49+
process.shell = ['/bin/bash', '-euo', 'pipefail']
4250

4351
timeline {
4452
enabled = true
45-
file = "${params.outdir}/NGI-ExoSeq_timeline.html"
53+
file = "${params.tracedir}/pipeline_info/nfcore-exoseq_timeline.html"
54+
}
55+
report {
56+
enabled = true
57+
file = "${params.tracedir}/pipeline_info/nfcore-exoseq_report.html"
4658
}
47-
4859
trace {
4960
enabled = true
50-
file = "${params.outdir}/NGI-ExoSeq_trace.txt"
61+
file = "${params.tracedir}/pipeline_info/nfcore-exoseq_trace.txt"
62+
}
63+
dag {
64+
enabled = true
65+
file = "${params.tracedir}/pipeline_info/nfcore-exoseq_DAG.svg"
5166
}
5267

68+
5369
manifest {
5470
homePage = 'https://github.com/SciLifeLab/NGI-ExoSeq'
5571
description = 'Nextflow Exome Sequencing Best Practice analysis pipeline.'

0 commit comments

Comments
 (0)