Skip to content

Commit

Permalink
Merge pull request #152 from MaxUlysse/CodePolish
Browse files Browse the repository at this point in the history
Code polish
  • Loading branch information
maxulysse authored Mar 12, 2020
2 parents ff5a256 + ba9b481 commit e4cb662
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 122 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [#115](https://github.com/nf-core/sarek/pull/115) - Add [@szilvajuhos](https://github.com/szilvajuhos) abstract for ESHG2020
- [#117](https://github.com/nf-core/sarek/pull/117) - Add `Trim Galore` possibilities to Sarek
- [#141](https://github.com/nf-core/sarek/pull/141) - Add containers for `WBcel235`
- GitHub actions AWS megatests
- [#150](https://github.com/nf-core/sarek/pull/150), [#151](https://github.com/nf-core/sarek/pull/151), [#154](https://github.com/nf-core/sarek/pull/154) - Add AWS mega test GitHub Actions

### `Changed`

Expand All @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [#141](https://github.com/nf-core/sarek/pull/141) - Update `VEP` databases to `99`
- [#143](https://github.com/nf-core/sarek/pull/143) - Revert `snpEff` cache version to `75` for `GRCh37`
- [#143](https://github.com/nf-core/sarek/pull/143) - Revert `snpEff` cache version to `86` for `GRCh38`
- [#152](https://github.com/nf-core/sarek/pull/152) - Update docs

### `Fixed`

Expand All @@ -52,9 +53,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [#129](https://github.com/nf-core/sarek/pull/129) - Apply @drpatelh fix for `mardown_to_html.py` compatibility with Python 2
- [#129](https://github.com/nf-core/sarek/pull/129) - Removed `Python` `3.7.3` from conda environment due to incompatibility
- [#129](https://github.com/nf-core/sarek/pull/129) - Change ascii characters that were not supported from the `output.md` docs
- [#140](https://github.com/nf-core/sarek/pull/140) - Fix extra T/N combinations for `ASCAT` cf [#136](https://github.com/nf-core/sarek/issues/136)
- [#141](https://github.com/nf-core/sarek/pull/141) - Fix `download_cache.nf` script to download cache for `snpEff` and `VEP`
- [#143](https://github.com/nf-core/sarek/pull/143) - Fix annotation CI testing with `snpEff` and `VEP`
- [#144](https://github.com/nf-core/sarek/pull/144) - Fix CircleCI for building `VEP` containers
- [#146](https://github.com/nf-core/sarek/pull/146) - Fix `--no_intervals` for `Mutect2` cf [#135](https://github.com/nf-core/sarek/issues/135)

### `Deprecated`

Expand Down Expand Up @@ -93,6 +96,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [#107](https://github.com/nf-core/sarek/pull/107) - `--singleCPUMem` is now removed, use `--single_cpu_mem` instead
- [#107](https://github.com/nf-core/sarek/pull/107) - `--snpeffDb` is now removed, use `--snpeff_db` instead
- [#107](https://github.com/nf-core/sarek/pull/107) - `--vepCacheVersion` is now removed, use `--vep_cache_version` instead
- [#152](https://github.com/nf-core/sarek/pull/152) - Removed `Jenkinsfile`

## [2.5.2] - Jåkkåtjkaskajekna

Expand Down
63 changes: 0 additions & 63 deletions Jenkinsfile

This file was deleted.

21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,28 @@ Main authors:

Helpful contributors:

* [Johannes Alneberg](https://github.com/alneberg)
* [Phil Ewels](https://github.com/ewels)
* [Adrian Lärkeryd](https://github.com/adrlar)
* [Alexander Peltzer](https://github.com/apeltzer)
* [Chela James](https://github.com/chelauk)
* [Francesco L](https://github.com/nibscles)
* [FriederikeHanssen](https://github.com/FriederikeHanssen)
* [Gisela Gabernet](https://github.com/ggabernet)
* [Jesper Eisfeldt](https://github.com/J35P312)
* [Johannes Alneberg](https://github.com/alneberg)
* [KochTobi](https://github.com/KochTobi)
* [Lucia Conde](https://github.com/lconde-ucl)
* [Malin Larsson](https://github.com/malinlarsson)
* [Marcel Martin](https://github.com/marcelm)
* [Alexander Peltzer](https://github.com/apeltzer)
* [Nilesh Tawari](https://github.com/nilesh-tawari)
* [Phil Ewels](https://github.com/ewels)
* [Sabrina Krakau](https://github.com/skrakau)
* [Sebastian-D](https://github.com/Sebastian-D)
* [Winni Kretzschmar](https://github.com/winni2k)
* [arontommi](https://github.com/arontommi)
* [bjornnystedt](https://github.com/bjornnystedt)
* [cgpu](https://github.com/cgpu)
* [gulfshores](https://github.com/gulfshores)
* [KochTobi](https://github.com/KochTobi)
* [pallolason](https://github.com/pallolason)
* [Sebastian-D](https://github.com/Sebastian-D)
* [silviamorins](https://github.com/silviamorins)

## Contributions & Support
Expand All @@ -116,7 +125,7 @@ For further information or help, don't hesitate to get in touch on [Slack](https
## Citation

If you use `nf-core/sarek` for your analysis, please cite the `Sarek` pre-print as follows:
> Garcia M, Juhos S, Larsson M et al. **Sarek: A portable workflow for whole-genome sequencing analysis of germline and somatic variants [version 1; peer review: awaiting peer review].**. *F1000Research* 2020, 9:63. [doi: 10.12688/f1000research.16665.1](https://f1000research.com/articles/9-63/v1).
> Garcia M, Juhos S, Larsson M et al. **Sarek: A portable workflow for whole-genome sequencing analysis of germline and somatic variants [version 1; peer review: 1 approved]** *F1000Research* 2020, 9:63 [doi: 10.12688/f1000research.16665.1](https://f1000research.com/articles/9-63/v1).
You can cite the sarek zenodo record for a specific version using the following [doi: 10.5281/zenodo.3476426](https://zenodo.org/badge/latestdoi/184289291)

Expand Down
2 changes: 1 addition & 1 deletion containers/vep/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN conda env export --name nf-core-sarek-vep-dev > nf-core-sarek-vep-dev.yml
# Setup default ARG variables
ARG GENOME=GRCh38
ARG SPECIES=homo_sapiens
ARG VEP_VERSION=95
ARG VEP_VERSION=99

# Download Genome
RUN vep_install \
Expand Down
28 changes: 19 additions & 9 deletions docs/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,26 @@ With Sarek, annotation is done using `snpEff`, `VEP`, or even both consecutively
VCF produced by Sarek will be annotated if `snpEff` or `VEP` are specified with the `--tools` command.
As Sarek will use `bgzip` and `tabix` to compress and index VCF files annotated, it expects VCF files to be sorted.

In these examples, all command lines will be launched starting with step `annotate`.
In these examples, all command lines will be launched starting with `--step annotate`.
It can of course be started directly from any other step instead.

## Using genome specific containers

Sarek has already designed containers with `snpEff` and `VEP` files for `GRCh37`, `GRCh38` and `GRCm38`.
Sarek has already designed containers with `snpEff` and `VEP` files for Human (`GRCh37`, `GRCh38`) Mouse (`GRCm38`), Dog (`CanFam3.1`) and Roundworm (`WBcel235`).
Default settings will run using these containers.

The main Sarek container has also `snpEff` and `VEP` installed, but without the cache files that can be downloaded separately.

## Download cache

A Nextflow helper script has been designed to help downloading `snpEff` and `VEP` cache.
Such files are meant to be shared between multiple users, so this script is mainly meant for people administrating servers, clusters and advanced users.

```bash
nextflow run download_cache.nf --snpeff_cache </Path/To/snpEffCache> --snpeff_db <snpEff DB version> --genome <GENOME>
nextflow run download_cache.nf --vep_cache </Path/To/VEPcache> --species <species> --vep_cache_version <VEP cache version> --genome <GENOME>
```

## Using downloaded cache

Both `snpEff` and `VEP` enable usage of cache.
Expand All @@ -36,8 +46,8 @@ The cache will only be used when `--annotation_cache` and cache directories are
Example:

```bash
nextflow run nf-core/sarek --tools snpEff --step annotate --sample file.vcf.gz --snpEff_cache /Path/To/snpEffCache --annotation_cache
nextflow run nf-core/sarek --tools VEP --step annotate --sample file.vcf.gz --vep_cache /Path/To/vepCache --annotation_cache
nextflow run nf-core/sarek --tools snpEff --step annotate --sample file.vcf.gz --snpEff_cache </Path/To/snpEffCache> --annotation_cache
nextflow run nf-core/sarek --tools VEP --step annotate --sample file.vcf.gz --vep_cache </Path/To/vepCache> --annotation_cache
```

## Using VEP CADD plugin
Expand All @@ -52,10 +62,10 @@ Example:

```bash
nextflow run nf-core/sarek --step annotate --tools VEP --sample file.vcf.gz --cadd_cache \
--cadd_InDels /PathToCADD/InDels.tsv.gz \
--cadd_InDels_tbi /PathToCADD/InDels.tsv.gz.tbi \
--cadd_WG_SNVs /PathToCADD/whole_genome_SNVs.tsv.gz \
--cadd_WG_SNVs_tbi /PathToCADD/whole_genome_SNVs.tsv.gz.tbi
--cadd_InDels </PathToCADD/InDels.tsv.gz> \
--cadd_InDels_tbi </PathToCADD/InDels.tsv.gz.tbi> \
--cadd_WG_SNVs </PathToCADD/whole_genome_SNVs.tsv.gz> \
--cadd_WG_SNVs_tbi </PathToCADD/whole_genome_SNVs.tsv.gz.tbi>
```

### Downloading CADD files
Expand All @@ -64,7 +74,7 @@ An helper script has been designed to help downloading CADD files.
Such files are meant to be share between multiple users, so this script is mainly meant for people administrating servers, clusters and advanced users.

```bash
nextflow run downloadcache.nf --cadd_cache /Path/To/CADDcache --cadd_version <CADD version> --genome <GENOME>
nextflow run download_cache.nf --cadd_cache </Path/To/CADDcache> --cadd_version <CADD version> --genome <GENOME>
```

## Using VEP GeneSplicer plugin
Expand Down
60 changes: 28 additions & 32 deletions download_cache.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,27 @@ def helpMessage() {
log.info nfcoreHeader()
log.info"""
Usage:
--help
you're reading it
nextflow run download_cache.nf [--snpeff_cache <pathToSNPEFFcache>] [--vep_cache <pathToVEPcache>]
[--cadd_cache <pathToCADDcache> --cadd_version <CADD Version>]
--snpeff_cache <Directoy>
Specify path to snpEff cache
If none, will use snpEff version specified in configuration
Will use snpEff cache version for ${params.genome}: ${params.genomes[params.genome].snpeff_db} in igenomes configuration file:
Change with --genome or in configuration files
--vep_cache <Directoy>
Specify path to VEP cache
If none, will use VEP version specified in configuration
Will from th iGenomes configuration file for ${params.genome}:
VEP cache version: ${params.genomes[params.genome].vep_cache_version}
and species ${params.genomes[params.genome].species}
Change with --genome or in configuration files
--cadd_cache <Directoy>
Specify path to CADD cache
Will use CADD version specified
--cadd_version <version>
Will specify which CADD version to download
Usage:
The typical command for running the pipeline is as follows:
nextflow run nf-core/sarek/download_cache.nf -profile docker --genome <genome> --help
[--snpeff_cache <pathToSNPEFFcache> --snpeff_db_version <snpEff DB version>]
[--vep_cache <pathToVEPcache> --vep_cache_version <VEP cache version> --species <species>]
[--cadd_cache <pathToCADDcache> --cadd_version <CADD Version>]
Options:
--help [bool] You're reading it
--snpeff_cache [file] Path to snpEff cache
--snpeff_db_version [str] snpEff DB version
Default: ${params.genomes[params.genome].snpeff_db}
--vep_cache [file] Path to VEP cache
--vep_cache_version [int] VEP cache version
Default: ${params.genomes[params.genome].vep_cache_version}
--species [str] Species
Default: ${params.genomes[params.genome].species}
--cadd_cache [file] Path to CADD cache
--cadd_version [str] CADD version to download
""".stripIndent()
}

Expand Down Expand Up @@ -216,20 +214,18 @@ process DownloadCADD {

cadd_files = cadd_files.dump(tag: 'cadd_files')

def nfcoreHeader(){
def nfcoreHeader() {
// Log colors ANSI codes
c_reset = params.monochrome_logs ? '' : "\033[0m";
c_dim = params.monochrome_logs ? '' : "\033[2m";
c_black = params.monochrome_logs ? '' : "\033[0;30m";
c_red = params.monochrome_logs ? '' : "\033[0;31m";
c_green = params.monochrome_logs ? '' : "\033[0;32m";
c_yellow = params.monochrome_logs ? '' : "\033[0;33m";
c_blue = params.monochrome_logs ? '' : "\033[0;34m";
c_dim = params.monochrome_logs ? '' : "\033[2m";
c_green = params.monochrome_logs ? '' : "\033[0;32m";
c_purple = params.monochrome_logs ? '' : "\033[0;35m";
c_cyan = params.monochrome_logs ? '' : "\033[0;36m";
c_reset = params.monochrome_logs ? '' : "\033[0m";
c_white = params.monochrome_logs ? '' : "\033[0;37m";
c_yellow = params.monochrome_logs ? '' : "\033[0;33m";

return """ ${c_dim}----------------------------------------------------${c_reset}
return """ -${c_dim}--------------------------------------------------${c_reset}-
${c_green},--.${c_black}/${c_green},-.${c_reset}
${c_blue} ___ __ __ __ ___ ${c_green}/,-._.--~\'${c_reset}
${c_blue} |\\ | |__ __ / ` / \\ |__) |__ ${c_yellow}} {${c_reset}
Expand All @@ -243,7 +239,7 @@ def nfcoreHeader(){
${c_white}`${c_green}|${c_reset}____${c_green}\\${c_reset}´${c_reset}
${c_purple} nf-core/sarek v${workflow.manifest.version}${c_reset}
${c_dim}----------------------------------------------------${c_reset}
-${c_dim}--------------------------------------------------${c_reset}-
""".stripIndent()
}

Expand Down
Loading

0 comments on commit e4cb662

Please sign in to comment.