From 1c0ddaae367ec7496ab8339910a9b30ca25a3058 Mon Sep 17 00:00:00 2001 From: priesgof Date: Sun, 30 May 2021 17:42:16 +0200 Subject: [PATCH] correct issue with --help and reorganize things --- .gitignore | 2 -- Makefile | 1 + README.md | 10 +++++----- filter_passed.sh => bin/filter_passed.sh | 10 +++++----- normalization.sh => bin/normalization.sh | 0 summary.sh => bin/summary.sh | 14 +++++++------- environment.yml | 2 +- .../variant_normalization_pipeline.png | Bin main.nf | 2 +- nextflow.config | 4 ++-- 10 files changed, 22 insertions(+), 23 deletions(-) rename filter_passed.sh => bin/filter_passed.sh (96%) rename normalization.sh => bin/normalization.sh (100%) rename summary.sh => bin/summary.sh (96%) rename variant_normalization_pipeline.png => images/variant_normalization_pipeline.png (100%) diff --git a/.gitignore b/.gitignore index c12a1c8..3f632c1 100755 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,6 @@ work .nextflow .nextflow.* -tests/resources/output* -tests/resources/input_files* venv __pycache__ output diff --git a/Makefile b/Makefile index 41d1b54..3e04986 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ clean: rm -rf .nextflow* test: + nextflow main.nf --help nextflow main.nf -profile test,conda --output output/test1 nextflow main.nf -profile test,conda --output output/test2 --filter PASS,MNV nextflow main.nf -profile test,conda --output output/test3 --skip_decompose_complex diff --git a/README.md b/README.md index 5c36f9a..e290e6e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![DOI](https://zenodo.org/badge/372133189.svg)](https://zenodo.org/badge/latestdoi/372133189) -This pipeline aims at normalizing variants represented in a VCF into the convened normal form as described in Tan et al., 2015. -The variant normalization is based on the implementation in vt and bcftools. -The pipeline is implemented on the Nextflow framework. +This pipeline aims at normalizing variants represented in a VCF into the convened normal form as described in Tan 2015. +The variant normalization is based on the implementation in vt (Tan 2015) and bcftools (Danecek 2021). +The pipeline is implemented on the Nextflow (Di Tommaso 2017) framework. The pipeline consists of the following steps: * Variant filtering (optional) @@ -18,7 +18,7 @@ The output consists of: * Summary statistics before and after normalization -![Pipeline](variant_normalization_pipeline.png) +![Pipeline](images/variant_normalization_pipeline.png) ## Examples @@ -108,7 +108,7 @@ Same as MNVs this behaviour can de disabled with `--skip_decompose_complex`. ## How to run it ``` - $ nextflow run tron-bioinformatics/tron-variant-normalization -r v1.0.0 --help + $ nextflow run tron-bioinformatics/tronflow-variant-normalization --help TronFlow VCF normalization v${VERSION} diff --git a/filter_passed.sh b/bin/filter_passed.sh similarity index 96% rename from filter_passed.sh rename to bin/filter_passed.sh index f952cc2..b928146 100755 --- a/filter_passed.sh +++ b/bin/filter_passed.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env bash -vcf=$1 - -# keeps only the passed variants -bcftools view --apply-filters PASS -o `basename $vcf .vcf`.passed.vcf $vcf +#!/usr/bin/env bash +vcf=$1 + +# keeps only the passed variants +bcftools view --apply-filters PASS -o `basename $vcf .vcf`.passed.vcf $vcf diff --git a/normalization.sh b/bin/normalization.sh similarity index 100% rename from normalization.sh rename to bin/normalization.sh diff --git a/summary.sh b/bin/summary.sh similarity index 96% rename from summary.sh rename to bin/summary.sh index d63fc72..8b18927 100644 --- a/summary.sh +++ b/bin/summary.sh @@ -1,7 +1,7 @@ -#!/usr/bin/env bash -vcf=$1 - -module load anaconda/3/2019 - -bcftools summary $vcf > `basename $vcf .vcf`.stats -plot-vcfstats -p `basename $vcf .vcf`.stats_plots `basename $vcf .vcf`.stats +#!/usr/bin/env bash +vcf=$1 + +module load anaconda/3/2019 + +bcftools summary $vcf > `basename $vcf .vcf`.stats +plot-vcfstats -p `basename $vcf .vcf`.stats_plots `basename $vcf .vcf`.stats diff --git a/environment.yml b/environment.yml index 5d4c05f..4338f9b 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,6 @@ # You can use this file to create a conda environment for this pipeline: # conda env create -f environment.yml -name: tronflow-variant-normalization-1.0.0 +name: tronflow-variant-normalization channels: - conda-forge - bioconda diff --git a/variant_normalization_pipeline.png b/images/variant_normalization_pipeline.png similarity index 100% rename from variant_normalization_pipeline.png rename to images/variant_normalization_pipeline.png diff --git a/main.nf b/main.nf index 6dec542..0ca7544 100755 --- a/main.nf +++ b/main.nf @@ -11,7 +11,7 @@ params.memory = "4g" if (params.help) { - log.info params.help + log.info params.help_message exit 0 } diff --git a/nextflow.config b/nextflow.config index b634d77..9bb0d17 100644 --- a/nextflow.config +++ b/nextflow.config @@ -27,7 +27,7 @@ env { // Capture exit codes from upstream processes when piping process.shell = ['/bin/bash', '-euo', 'pipefail'] -VERSION = '1.0.0' +VERSION = '1.0.1' manifest { name = 'TRON-Bioinformatics/tronflow-vcf-normalization' @@ -40,7 +40,7 @@ manifest { } params.help_message = """ -TronFlow VCF normalization v${VERSION} +TronFlow variant normalization v${VERSION} Usage: nextflow run main.nf --input_files input_files --reference reference.fasta