Skip to content

Commit

Permalink
correct issue with --help and reorganize things
Browse files Browse the repository at this point in the history
  • Loading branch information
priesgo committed May 30, 2021
1 parent d547433 commit 1c0ddaa
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
work
.nextflow
.nextflow.*
tests/resources/output*
tests/resources/input_files*
venv
__pycache__
output
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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}
Expand Down
10 changes: 5 additions & 5 deletions filter_passed.sh → bin/filter_passed.sh
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
14 changes: 7 additions & 7 deletions summary.sh → bin/summary.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ params.memory = "4g"


if (params.help) {
log.info params.help
log.info params.help_message
exit 0
}

Expand Down
4 changes: 2 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 1c0ddaa

Please sign in to comment.