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

Commit bb8d291

Browse files
authored
Merge pull request #13 from apeltzer/travis
Travis Tests for ExoSeq
2 parents 6b5b654 + 123eb33 commit bb8d291

9 files changed

Lines changed: 155 additions & 51 deletions

File tree

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
sudo: required
2+
language: java
3+
jdk: openjdk8
4+
services:
5+
- docker
6+
python:
7+
- "2.7"
8+
9+
cache: pip
10+
11+
matrix:
12+
fast_finish: true
13+
14+
install:
15+
- "./scripts/install.sh --tool $TOOL_INSTALL"
16+
# Install nf-core/tools
17+
- git clone https://github.com/nf-core/tools.git /tmp/nf-core-tools
18+
- cd /tmp/nf-core-tools
19+
- pip install --user -e .
20+
# Get Kit Files
21+
- wget -O kits.tar.bz2 https://qbic-intranet.am10.uni-tuebingen.de/owncloud/index.php/s/Qvku3etEqb3PW58/download
22+
# Get tiny Reference Files
23+
# Reset
24+
- cd ${TRAVIS_BUILD_DIR}/tests
25+
26+
env:
27+
global:
28+
- NXF_VER=0.27.6 SGT_VER=2.4.2
29+
matrix:
30+
- PROFILE=docker TEST=TOOLS TOOL_INSTALL=ALL
31+
- PROFILE=singularity TEST=TOOLS TOOL_INSTALL=ALL
32+
33+
script:
34+
- "nf-core lint ${TRAVIS_BUILD_DIR}"
35+
- "./scripts/test.sh --profile $PROFILE --test $TEST"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
## [nf-core/ExoSeq v0.9dev]
1+
## [nf-core/ExoSeq v1.0dev]
22
The release marks the point where the pipeline was moved from SciLifeLab/NGI-ExoSeq over to the new nf-core community, at nf-core/ExoSeq.

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')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ![nf-core/ExoSeq](https://raw.githubusercontent.com/nf-core/Exoseq/master/docs/images/ExoSeq_logo.png)
2-
2+
[![Build Status](https://travis-ci.org/nf-core/ExoSeq.svg?branch=master)](https://travis-ci.org/nf-core/ExoSeq)
33
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.27.6-brightgreen.svg)](https://www.nextflow.io/)
44
[![Gitter](https://img.shields.io/badge/gitter-%20join%20chat%20%E2%86%92-4fb99a.svg)](https://gitter.im/nf-core/exoseq)
55
[![Docker Container available](https://img.shields.io/docker/automated/nfcore/exoseq.svg)](https://hub.docker.com/r/nfcore/exoseq/)

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.'

scripts/install.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
#Credit to the Sarek devs at https://github.com/SciLifeLab/Sarek
3+
TOOL="all"
4+
5+
while [[ $# -gt 0 ]]
6+
do
7+
key="$1"
8+
case $key in
9+
-t|--tool)
10+
TOOL="$2"
11+
shift # past argument
12+
shift # past value
13+
;;
14+
*) # unknown option
15+
shift # past argument
16+
;;
17+
esac
18+
done
19+
20+
# Install Nextflow
21+
if [[ "$TOOL" = nextflow ]] || [[ "$TOOL" = all ]]
22+
then
23+
cd $HOME
24+
curl -fsSL get.nextflow.io | bash
25+
chmod +x nextflow
26+
sudo mv nextflow /usr/local/bin/
27+
fi
28+
29+
# Install Singularity
30+
if [[ "$TOOL" = singularity ]] || [[ "$TOOL" = all ]]
31+
then
32+
sudo apt-get install squashfs-tools
33+
cd $HOME
34+
wget https://github.com/singularityware/singularity/releases/download/$SGT_VER/singularity-$SGT_VER.tar.gz
35+
tar xvf singularity-$SGT_VER.tar.gz
36+
cd singularity-$SGT_VER
37+
./configure --prefix=/usr/local
38+
make
39+
sudo make install
40+
cd ..
41+
rm -rf singularity-$SGT_VER*
42+
fi

0 commit comments

Comments
 (0)