From ebbf0d5c08a1316f8d03897cfac48ea328219f14 Mon Sep 17 00:00:00 2001 From: nservant <nicolas.servant@curie.fr> Date: Mon, 6 Jul 2020 18:50:28 +0200 Subject: [PATCH] [Fix] bug in --fasta parameter --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 7 +++++++ Dockerfile | 4 ++-- environment.yml | 2 +- main.nf | 6 +++--- nextflow.config | 4 ++-- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7f734d..da1d4b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Pull docker image run: | docker pull nfcore/hic:dev - docker tag nfcore/hic:dev nfcore/hic:1.2.0 + docker tag nfcore/hic:dev nfcore/hic:1.2.1 - name: Run pipeline with test data run: | # nf-core: You can customise CI pipeline run tests as required diff --git a/CHANGELOG.md b/CHANGELOG.md index 6852128..e0ef895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## v1.2.1 - 2020-07-06 + +### `Fixed` + +* Fix issue with `--fasta` option and `.fa` extension (#66) + ## v1.2.0 - 2020-06-18 ### `Added` diff --git a/Dockerfile b/Dockerfile index 5aecaa6..7d67f49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ RUN apt-get update && apt-get install -y gcc g++ && apt-get clean -y COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -ENV PATH /opt/conda/envs/nf-core-hic-1.2.0/bin:$PATH +ENV PATH /opt/conda/envs/nf-core-hic-1.2.1/bin:$PATH # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-hic-1.2.0 > nf-core-hic-1.2.0.yml +RUN conda env export --name nf-core-hic-1.2.1 > nf-core-hic-1.2.1.yml diff --git a/environment.yml b/environment.yml index b9e6c02..e8944c6 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: nf-core-hic-1.2.0 +name: nf-core-hic-1.2.1 channels: - conda-forge - bioconda diff --git a/main.nf b/main.nf index 7eb4315..10a1b95 100644 --- a/main.nf +++ b/main.nf @@ -182,8 +182,9 @@ if ( params.bwt2_index ){ } else if ( params.fasta ) { lastPath = params.fasta.lastIndexOf(File.separator) - bwt2_base = params.fasta.substring(lastPath+1) - + fasta_base = params.fasta.substring(lastPath+1) + bwt2_base = fasta_base.toString() - ~/(\.fa)?(\.fasta)?(\.fas)?(\.fsa)?$/ + Channel.fromPath( params.fasta ) .ifEmpty { exit 1, "Genome index: Fasta file not found: ${params.fasta}" } .set { fasta_for_index } @@ -361,7 +362,6 @@ if(!params.bwt2_index && params.fasta){ file "bowtie2_index" into bwt2_index_trim script: - bwt2_base = fasta.toString() - ~/(\.fa)?(\.fasta)?(\.fas)?$/ """ mkdir bowtie2_index bowtie2-build ${fasta} bowtie2_index/${bwt2_base} diff --git a/nextflow.config b/nextflow.config index f7a5af7..391610d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -64,7 +64,7 @@ params { // Container slug. Stable releases should specify release tag! // Developmental code should specify :dev -process.container = 'nfcore/hic:1.2.0' +process.container = 'nfcore/hic:1.2.1' // Load base.config by default for all pipelines includeConfig 'conf/base.config' @@ -135,7 +135,7 @@ manifest { description = 'Analysis of Chromosome Conformation Capture data (Hi-C)' mainScript = 'main.nf' nextflowVersion = '>=19.10.0' - version = '1.2.0' + version = '1.2.1' } // Function to ensure that resource requirements don't go beyond -- GitLab