-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TRON-Bioinformatics/nextflow
Makes Nextflow workflow work with conda + add automated tests
- Loading branch information
Showing
23 changed files
with
235 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Automated tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' # See 'Supported distributions' for available options | ||
java-version: '11' | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
- name: Install dependencies | ||
run: | | ||
apt-get update && apt-get --assume-yes install wget make procps software-properties-common | ||
wget -qO- https://get.nextflow.io | bash && cp nextflow /usr/local/bin/nextflow | ||
- name: Run tests | ||
run: | | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,8 @@ vafator.egg-info | |
**/__pycache__ | ||
.idea | ||
venv-win | ||
.nextflow.log* | ||
work/ | ||
output/ | ||
.nextflow/ | ||
.tox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
all : clean test check | ||
|
||
clean: | ||
rm -rf output | ||
#rm -rf work | ||
rm -f .nextflow.log* | ||
rm -rf .nextflow* | ||
|
||
|
||
test: | ||
nextflow main.nf --help | ||
echo "sample_1\t"`pwd`"/test_data/test_tumor_normal.vcf\t"`pwd`"/test_data/TESTX_S1_L001.bam\t"`pwd`"/test_data/TESTX_S1_L002.bam\n" > test_data/test_input.txt | ||
echo "sample_2\t"`pwd`"/test_data/test_single_sample.vcf\t"`pwd`"/test_data/TESTX_S1_L001.bam,"`pwd`"/test_data/TESTX_S1_L002.bam\t"`pwd`"/test_data/TESTX_S1_L001.bam,"`pwd`"/test_data/TESTX_S1_L002.bam" >> test_data/test_input.txt | ||
nextflow main.nf -profile test,conda --output output/test1 --input_files test_data/test_input.txt | ||
nextflow main.nf -profile test,conda --output output/test2 --input_files test_data/test_input.txt --skip_multiallelic_filter | ||
|
||
|
||
check: | ||
test -s output/test1/sample_1/test_tumor_normal.vaf.vcf || { echo "Missing test 1 sample 1 output file!"; exit 1; } | ||
test -s output/test1/sample_1/test_tumor_normal.vaf.filtered_multiallelics.vcf || { echo "Missing test 1 sample 1 output file!"; exit 1; } | ||
test -s output/test1/sample_2/test_single_sample.vaf.vcf || { echo "Missing test 1 sample 2 output file!"; exit 1; } | ||
test -s output/test1/sample_2/test_single_sample.vaf.filtered_multiallelics.vcf || { echo "Missing test 1 sample 1 output file!"; exit 1; } | ||
test -s output/test1/sample_1/test_tumor_normal.vaf.vcf || { echo "Missing test 2 sample 1 output file!"; exit 1; } | ||
test -s output/test1/sample_2/test_single_sample.vaf.vcf || { echo "Missing test 2 sample 2 output file!"; exit 1; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# You can use this file to create a conda environment for this pipeline: | ||
# conda env create -f environment.yml | ||
name: covigator-pipeline | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bioconda::vafator=0.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
params.cpus = 1 | ||
params.memory = "4g" | ||
|
||
params.help= false | ||
params.input_files = false | ||
params.output = false | ||
params.mapping_quality = false | ||
params.base_call_quality = false | ||
params.skip_multiallelic_filter = false | ||
|
||
profiles { | ||
conda { process.conda = "$baseDir/environment.yml" } | ||
debug { process.beforeScript = 'echo $HOSTNAME' } | ||
test { | ||
params.cpus = 1 | ||
params.memory = "3g" | ||
timeline.enabled = false | ||
report.enabled = false | ||
trace.enabled = false | ||
dag.enabled = false | ||
} | ||
} | ||
|
||
// Export this variable to prevent local Python libraries from conflicting with those in the container | ||
env { | ||
PYTHONNOUSERSITE = 1 | ||
} | ||
|
||
// Capture exit codes from upstream processes when piping | ||
process.shell = ['/bin/bash', '-euo', 'pipefail'] | ||
|
||
cleanup = true | ||
conda.createTimeout = '1 h' | ||
|
||
VERSION = '0.3.4' | ||
|
||
manifest { | ||
name = 'TRON-Bioinformatics/vafator' | ||
author = 'Pablo Riesgo-Ferreiro' | ||
homePage = 'https://github.com/TRON-Bioinformatics/vafator' | ||
description = 'A tool to annotate VCF files with variant allele frequencies and depth of coverage' | ||
mainScript = 'main.nf' | ||
nextflowVersion = '>=19.10.0' | ||
version = VERSION | ||
} | ||
|
||
params.help_message = """ | ||
VAFator $VERSION | ||
Usage: | ||
nextflow run main.nf --input_files input_files | ||
This workflow implements the annotation of a tumor/normal pair VCF with the | ||
variant allele frequencies, counts and depth of coverage extracted from the | ||
corresponding BAM files. | ||
Input: | ||
* input_files: the path to a tab-separated values file containing in each | ||
row the sample name, path to the VCF file, a comma-separated list of normal | ||
BAMs and a comma-separated list of normal BAMs | ||
The input file does not have header! | ||
Example input file: | ||
identifier /path/to/your/file.vcf /path/to/your/normal_replica1.bam,/path/to/your/normal_replica2.bam /path/to/your/tumor_replica1.bam,/path/to/your/tumor_replica2.bam | ||
Optional input: | ||
* output: the folder where to publish output | ||
* skip_multiallelic_filter: skip the filtering of multiallelics by frequency in the tumor (only highest frequency variant at the same position is kept) | ||
* base_call_quality: threshold for the base call quality, only base calls with a higher value are considered (default: 29) | ||
* mapping_quality: threshold for the mapping quality, only reads with a higher value are considered (default: 0) | ||
Output: | ||
* Annotated VCF file | ||
""" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sample1 test_data/test_tumor_normal.vcf test_data/TESTX_S1_L001.bam test_data/TESTX_S1_L002.bam | ||
sample2 test_data/test_single_sample.vcf test_data/TESTX_S1_L001.bam,test_data/TESTX_S1_L002.bam test_data/TESTX_S1_L001.bam,test_data/TESTX_S1_L002.bam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sample_1 /home/priesgo/src/github/vafator/test_data/test_tumor_normal.vcf /home/priesgo/src/github/vafator/test_data/TESTX_S1_L001.bam /home/priesgo/src/github/vafator/test_data/TESTX_S1_L002.bam | ||
|
||
sample_2 /home/priesgo/src/github/vafator/test_data/test_single_sample.vcf /home/priesgo/src/github/vafator/test_data/TESTX_S1_L001.bam,/home/priesgo/src/github/vafator/test_data/TESTX_S1_L002.bam /home/priesgo/src/github/vafator/test_data/TESTX_S1_L001.bam,/home/priesgo/src/github/vafator/test_data/TESTX_S1_L002.bam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="Accept as a confident somatic mutation"> | ||
##FILTER=<ID=NOT_PASSED,Description="whatever"> | ||
##FILTER=<ID=MULTIALLELIC,Description="whatever"> | ||
##FILTER=<ID=UNTRIMMED,Description="whatever"> | ||
##FILTER=<ID=UNALIGNED,Description="whatever"> | ||
##FILTER=<ID=UNALIGNED-UNTRIMMED,Description="whatever"> | ||
##FILTER=<ID=MNV,Description="whatever"> | ||
##FILTER=<ID=MNV-INDEL,Description="whatever"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed"> | ||
##contig=<ID=chr1,length=249250621,assembly=hg19> | ||
##contig=<ID=chr2,length=243199373,assembly=hg19> | ||
##contig=<ID=chr3,length=198022430,assembly=hg19> | ||
##contig=<ID=chr4,length=191154276,assembly=hg19> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT tumor | ||
chr1 13082 . C A . NOT_PASSED GT:AD 0/1:76,1 | ||
chr1 13081 . A C . NOT_PASSED GT:AD 0/1:37,1 | ||
chr1 13202 . A G . NOT_PASSED GT:AD 0/1:107,26 | ||
chr1 13201 . T G . NOT_PASSED GT:AD 0/1:35,3 | ||
chr1 13201 . T C . PASS GT:AD 0/1:196,24 | ||
chr1 13263 . T C . PASS GT:AD 0/1:136,31 | ||
chr1 13083 . A C . PASS GT:AD 0/1:260,18 | ||
chr1 13263 . TCC CCC . UNTRIMMED GT:AD 0/1:136,31 | ||
chr1 13083 . AGA AGC . UNTRIMMED GT:AD 0/1:260,18 | ||
chr1 13141 . C AAAAAC . UNALIGNED GT:AD 0/1:76,14 | ||
chr1 13141 . CT AAAAACT . UNALIGNED-UNTRIMMED GT:AD 0/1:76,14 | ||
chr1 13141 . CTGAGG G . UNALIGNED GT:AD 0/1:76,14 | ||
chr1 13141 . CTGAGG GG . UNALIGNED-UNTRIMMED GT:AD 0/1:76,14 | ||
chr1 13081 . ACAG CCAC . MNV GT:AD 0/1:76,14 | ||
chr1 13141 . CTGAGG ATGAGT . MNV GT:AD 0/1:37,5 | ||
chr1 13201 . TAGCCT GAGCCC . MNV GT:AD 0/1:107,26 | ||
chr1 13261 . GCTCCT CCCCCC . MNV GT:AD 0/1:35,3 | ||
chr1 13321 . AGCCCT CGCC . MNV-INDEL GT:AD 0/1:196,24 | ||
chr1 13081 . ACA GCAAAAA . MNV-INDEL GT:AD 0/1:196,24 | ||
chr1 13204 . C G,T . MULTIALLELIC GT:AD 0/1:196,24,1 | ||
chr1 13324 . C G,T . MULTIALLELIC GT:AD 1/2:196,24,1 | ||
chr1 13262 . C G,T,A . MULTIALLELIC GT:AD 2/3:196,24,1,1 | ||
chr1 13323 . C A,G,T . MULTIALLELIC GT:AD 2/3:196,24,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="Accept as a confident somatic mutation"> | ||
##FILTER=<ID=NOT_PASSED,Description="whatever"> | ||
##FILTER=<ID=MULTIALLELIC,Description="whatever"> | ||
##FILTER=<ID=UNTRIMMED,Description="whatever"> | ||
##FILTER=<ID=UNALIGNED,Description="whatever"> | ||
##FILTER=<ID=UNALIGNED-UNTRIMMED,Description="whatever"> | ||
##FILTER=<ID=MNV,Description="whatever"> | ||
##FILTER=<ID=MNV-INDEL,Description="whatever"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed"> | ||
##contig=<ID=chr1,length=249250621,assembly=hg19> | ||
##contig=<ID=chr2,length=243199373,assembly=hg19> | ||
##contig=<ID=chr3,length=198022430,assembly=hg19> | ||
##contig=<ID=chr4,length=191154276,assembly=hg19> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT normal tumor | ||
chr1 13082 . C A . NOT_PASSED GT:AD 0:80,1 0/1:76,1 | ||
chr1 13081 . A C . NOT_PASSED GT:AD 0:62,0 0/1:37,1 | ||
chr1 13202 . A G . NOT_PASSED GT:AD 0:157,0 0/1:107,26 | ||
chr1 13201 . T G . NOT_PASSED GT:AD 0:41,0 0/1:35,3 | ||
chr1 13201 . T C . PASS GT:AD 0:229,1 0/1:196,24 | ||
chr1 13263 . T C . PASS GT:AD 0:229,0 0/1:136,31 | ||
chr1 13083 . A C . PASS GT:AD 0:276,0 0/1:260,18 | ||
chr1 13263 . TCC CCC . UNTRIMMED GT:AD 0:229,0 0/1:136,31 | ||
chr1 13083 . AGA AGC . UNTRIMMED GT:AD 0:276,0 0/1:260,18 | ||
chr1 13141 . C AAAAAC . UNALIGNED GT:AD 0:80,1 0/1:76,14 | ||
chr1 13141 . CT AAAAACT . UNALIGNED-UNTRIMMED GT:AD 0:80,1 0/1:76,14 | ||
chr1 13141 . CTGAGG G . UNALIGNED GT:AD 0:80,1 0/1:76,14 | ||
chr1 13141 . CTGAGG GG . UNALIGNED-UNTRIMMED GT:AD 0:80,1 0/1:76,14 | ||
chr1 13081 . ACAG CCAC . MNV GT:AD 0:80,1 0/1:76,14 | ||
chr1 13141 . CTGAGG ATGAGT . MNV GT:AD 0:62,0 0/1:37,5 | ||
chr1 13201 . TAGCCT GAGCCC . MNV GT:AD 0:157,0 0/1:107,26 | ||
chr1 13261 . GCTCCT CCCCCC . MNV GT:AD 0:41,0 0/1:35,3 | ||
chr1 13321 . AGCCCT CGCC . MNV-INDEL GT:AD 0:229,1 0/1:196,24 | ||
chr1 13081 . ACA GCAAAAA . MNV-INDEL GT:AD 0:229,1 0/1:196,24 | ||
chr1 13204 . C G,T . MULTIALLELIC GT:AD 1:229,1,1 0/1:196,24,1 | ||
chr1 13324 . C G,T . MULTIALLELIC GT:AD 0:229,1,1 1/2:196,24,1 | ||
chr1 13262 . C G,T,A . MULTIALLELIC GT:AD 1:229,1,1,1 2/3:196,24,1,1 | ||
chr1 13323 . C A,G,T . MULTIALLELIC GT:AD 1:229,1,1,1 2/3:196,24,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VERSION='0.3.3' | ||
VERSION='0.3.4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.