diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 14a7e8bffa54880834ad505addf8c91b875e5992..78c45d55dcf3cc4514fc8facc7a7a21be8f5d220 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,15 @@ +--- +name: Bug report +about: Report something that is broken or incorrect +labels: bug +--- + <!-- # nf-core/hic bug report Hi there! Thanks for telling us about a problem with the pipeline. - Please delete this text and anything that's not relevant from the template below: --> diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..887f04598ba6bb758d35d2ca79012ccc8129ff34 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Join nf-core + url: https://nf-co.re/join + about: Please join the nf-core community here + - name: "Slack #hic channel" + url: https://nfcore.slack.com/channels/hic + about: Discussion about the nf-core/hic pipeline diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 09e75156b38502f50915735211b9098b9cd68e3a..2e01a5fe11f6ed4f3e5bfb4bcaff8c8b7bdc56d5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,3 +1,9 @@ +--- +name: Feature request +about: Suggest an idea for the nf-core website +labels: enhancement +--- + <!-- # nf-core/hic feature request diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 76e9d3891314a04fafb23117045e4116a9deef03..e63ea697aa1c0b27438360e3186e6ddaf2b4afee 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -4,8 +4,9 @@ name: nf-core AWS full size tests # It runs the -profile 'test_full' on AWS batch on: - release: - types: [published] + workflow_run: + workflows: ["nf-core Docker push (release)"] + types: [completed] workflow_dispatch: jobs: @@ -15,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Miniconda - uses: goanpeca/setup-miniconda@v1.0.2 + uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true python-version: 3.7 diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index cd8579f8ae0390fa28d40a0579e2ad57f7801b29..92dfa0ddccbebce1ffae4aca4d631f295cb0e601 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Miniconda - uses: goanpeca/setup-miniconda@v1.0.2 + uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true python-version: 3.7 diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 04dbb3d4b77e32d8ff4e3fa7f0ba17046111d1a3..92136a144c3e48bc1a11a7c893f2d69f958dd65d 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -2,7 +2,7 @@ name: nf-core branch protection # This workflow is triggered on PRs to master branch on the repository # It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev` on: - pull_request: + pull_request_target: branches: [master] jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe636dd4fdc884d7ffc18dfc0b7ae81a186796f4..5553430d3c1f667b2dc0462cf709859df1b1d903 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,29 +20,31 @@ jobs: strategy: matrix: # Nextflow versions: check pipeline minimum and current latest - nxf_ver: ['19.10.0', ''] + nxf_ver: ['20.04.0', ''] steps: - name: Check out pipeline code uses: actions/checkout@v2 - name: Check if Dockerfile or Conda environment changed - uses: technote-space/get-diff-action@v1 + uses: technote-space/get-diff-action@v4 with: - PREFIX_FILTER: | + FILES: | Dockerfile environment.yml - name: Build new docker image - if: env.GIT_DIFF + if: env.MATCHED_FILES run: docker build --no-cache . -t nfcore/hic:dev - name: Pull docker image - if: ${{ !env.GIT_DIFF }} + if: ${{ !env.MATCHED_FILES }} run: | docker pull nfcore/hic:dev docker tag nfcore/hic:dev nfcore/hic:dev - name: Install Nextflow + env: + CAPSULE_LOG: none run: | wget -qO- get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8e8d5bbcf72289280dca21cdbe7623cd063d6f86..bef81e61905d8f265c06b7001c3c17d56d03ba4a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -38,6 +38,8 @@ jobs: uses: actions/checkout@v2 - name: Install Nextflow + env: + CAPSULE_LOG: none run: | wget -qO- get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ @@ -57,12 +59,19 @@ jobs: GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} - run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE} + run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE} --markdown lint_results.md + + - name: Save PR number + if: ${{ always() }} + run: echo ${{ github.event.pull_request.number }} > PR_number.txt - name: Upload linting log file artifact if: ${{ always() }} uses: actions/upload-artifact@v2 with: name: linting-log-file - path: lint_log.txt + path: | + lint_log.txt + lint_results.md + PR_number.txt diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml new file mode 100644 index 0000000000000000000000000000000000000000..90f03c6f91ba0c05d12daff7e15840145a63937f --- /dev/null +++ b/.github/workflows/linting_comment.yml @@ -0,0 +1,29 @@ + +name: nf-core linting comment +# This workflow is triggered after the linting action is complete +# It posts an automated comment to the PR, even if the PR is coming from a fork + +on: + workflow_run: + workflows: ["nf-core linting"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Download lint results + uses: dawidd6/action-download-artifact@v2 + with: + workflow: linting.yml + + - name: Get PR number + id: pr_number + run: echo "::set-output name=pr_number::$(cat linting-logs/PR_number.txt)" + + - name: Post PR comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.pr_number.outputs.pr_number }} + path: linting-logs/lint_results.md + diff --git a/.github/workflows/push_dockerhub_dev.yml b/.github/workflows/push_dockerhub_dev.yml new file mode 100644 index 0000000000000000000000000000000000000000..d6fc716fb947d262e0613ccab07655d387a98d1f --- /dev/null +++ b/.github/workflows/push_dockerhub_dev.yml @@ -0,0 +1,28 @@ +name: nf-core Docker push (dev) +# This builds the docker image and pushes it to DockerHub +# Runs on nf-core repo releases and push event to 'dev' branch (PR merges) +on: + push: + branches: + - dev + +jobs: + push_dockerhub: + name: Push new Docker image to Docker Hub (dev) + runs-on: ubuntu-latest + # Only run for the nf-core repo, for releases and merged PRs + if: ${{ github.repository == 'nf-core/hic' }} + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} + steps: + - name: Check out pipeline code + uses: actions/checkout@v2 + + - name: Build new docker image + run: docker build --no-cache . -t nfcore/hic:dev + + - name: Push Docker image to DockerHub (dev) + run: | + echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin + docker push nfcore/hic:dev diff --git a/.github/workflows/push_dockerhub.yml b/.github/workflows/push_dockerhub_release.yml similarity index 68% rename from .github/workflows/push_dockerhub.yml rename to .github/workflows/push_dockerhub_release.yml index 280f8ba5b9fa9581c0954275cf77629492aa5c7f..eda09ccfb6fcdd5791c56b6875343dc2bbf9c8c0 100644 --- a/.github/workflows/push_dockerhub.yml +++ b/.github/workflows/push_dockerhub_release.yml @@ -1,16 +1,13 @@ -name: nf-core Docker push +name: nf-core Docker push (release) # This builds the docker image and pushes it to DockerHub # Runs on nf-core repo releases and push event to 'dev' branch (PR merges) on: - push: - branches: - - dev release: types: [published] jobs: push_dockerhub: - name: Push new Docker image to Docker Hub + name: Push new Docker image to Docker Hub (release) runs-on: ubuntu-latest # Only run for the nf-core repo, for releases and merged PRs if: ${{ github.repository == 'nf-core/hic' }} @@ -24,15 +21,7 @@ jobs: - name: Build new docker image run: docker build --no-cache . -t nfcore/hic:latest - - name: Push Docker image to DockerHub (dev) - if: ${{ github.event_name == 'push' }} - run: | - echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - docker tag nfcore/hic:latest nfcore/hic:dev - docker push nfcore/hic:dev - - name: Push Docker image to DockerHub (release) - if: ${{ github.event_name == 'release' }} run: | echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin docker push nfcore/hic:latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 62f0e5f1fcfb257028ff9bade4edf1fab723e1ff..d11259a2ad55442ea006ced96d7821314349d9e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v1.2.2 - [date] +## v1.3.0dev - [date] Initial release of nf-core/hic, created with the [nf-core](https://nf-co.re/) template. diff --git a/Dockerfile b/Dockerfile index d7a7b246dedf0b81e5d9be40a0de0e5b1dbdcf7a..11a4ec81d7a3616c87e27fa3b4b2642125c984a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nfcore/base:1.11 +FROM nfcore/base:1.12 LABEL authors="Nicolas Servant" \ description="Docker image containing all software requirements for the nf-core/hic pipeline" @@ -7,10 +7,10 @@ COPY environment.yml / RUN conda env create --quiet -f /environment.yml && conda clean -a # Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-hic-1.2.2/bin:$PATH +ENV PATH /opt/conda/envs/nf-core-hic-1.3.0dev/bin:$PATH # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-hic-1.2.2 > nf-core-hic-1.2.2.yml +RUN conda env export --name nf-core-hic-1.3.0dev > nf-core-hic-1.3.0dev.yml # Instruct R processes to use these empty files instead of clashing with a local version RUN touch .Rprofile diff --git a/README.md b/README.md index 13e8e7c3a9d88a6ee06c43cf72cb11fa77f06c3c..6fba85333790611900fb643833922ec8f6dd2ad9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [](https://github.com/nf-core/hic/actions) [](https://github.com/nf-core/hic/actions) -[](https://www.nextflow.io/) +[](https://www.nextflow.io/) [](https://bioconda.github.io/) [](https://hub.docker.com/r/nfcore/hic) diff --git a/assets/nf-core-hic_logo.png b/assets/nf-core-hic_logo.png index dee3db82069b61e9a5380d940355f47ff565057c..6b364161664e70224fac3a83fb9f02ed0acbd9f8 100644 Binary files a/assets/nf-core-hic_logo.png and b/assets/nf-core-hic_logo.png differ diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt index 9afc48067351f78cb54af40a3d76180866edf729..bdf905878111122e2d6b6983f72e6a04c78e97b5 100644 --- a/assets/sendmail_template.txt +++ b/assets/sendmail_template.txt @@ -14,7 +14,7 @@ Content-Transfer-Encoding: base64 Content-ID: <nfcorepipelinelogo> Content-Disposition: inline; filename="nf-core-hic_logo.png" -<% out << new File("$baseDir/assets/nf-core-hic_logo.png"). +<% out << new File("$projectDir/assets/nf-core-hic_logo.png"). bytes. encodeBase64(). toString(). diff --git a/docs/images/nf-core-hic_logo.png b/docs/images/nf-core-hic_logo.png index dee3db82069b61e9a5380d940355f47ff565057c..e5fead372861ff430d7f1428e15dad9b045523e8 100644 Binary files a/docs/images/nf-core-hic_logo.png and b/docs/images/nf-core-hic_logo.png differ diff --git a/environment.yml b/environment.yml index 5762739c27540ed6cbb8a9e7314ced9561435abe..cde6a0c58bdaea5d3a9c55b167d26df11441799e 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.2 +name: nf-core-hic-1.3.0dev channels: - conda-forge - bioconda diff --git a/main.nf b/main.nf index 7a83f8e2316eb0c059a885b3eee004591a46a041..40164c2b2dfb43af888037960402d62d5e549288 100644 --- a/main.nf +++ b/main.nf @@ -92,10 +92,10 @@ if (workflow.profile.contains('awsbatch')) { } // Stage config files -ch_multiqc_config = file("$baseDir/assets/multiqc_config.yaml", checkIfExists: true) +ch_multiqc_config = file("$projectDir/assets/multiqc_config.yaml", checkIfExists: true) ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty() -ch_output_docs = file("$baseDir/docs/output.md", checkIfExists: true) -ch_output_docs_images = file("$baseDir/docs/images/", checkIfExists: true) +ch_output_docs = file("$projectDir/docs/output.md", checkIfExists: true) +ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true) /* * Create a channel for input read files @@ -326,18 +326,18 @@ workflow.onComplete { // Render the TXT template def engine = new groovy.text.GStringTemplateEngine() - def tf = new File("$baseDir/assets/email_template.txt") + def tf = new File("$projectDir/assets/email_template.txt") def txt_template = engine.createTemplate(tf).make(email_fields) def email_txt = txt_template.toString() // Render the HTML template - def hf = new File("$baseDir/assets/email_template.html") + def hf = new File("$projectDir/assets/email_template.html") def html_template = engine.createTemplate(hf).make(email_fields) def email_html = html_template.toString() // Render the sendmail template - def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, baseDir: "$baseDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ] - def sf = new File("$baseDir/assets/sendmail_template.txt") + def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, baseDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ] + def sf = new File("$projectDir/assets/sendmail_template.txt") def sendmail_template = engine.createTemplate(sf).make(smail_fields) def sendmail_html = sendmail_template.toString() diff --git a/nextflow.config b/nextflow.config index 42d1074af186e50964cd7f73df138920d933d2d7..d96244a3a8c4626a53960deea6df647e8b005311 100644 --- a/nextflow.config +++ b/nextflow.config @@ -57,7 +57,7 @@ try { } profiles { - conda { process.conda = "$baseDir/environment.yml" } + conda { process.conda = "$projectDir/environment.yml" } debug { process.beforeScript = 'echo $HOSTNAME' } docker { docker.enabled = true @@ -75,6 +75,7 @@ profiles { podman.enabled = true } test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } } // Load igenomes.config if required @@ -115,8 +116,8 @@ manifest { homePage = 'https://github.com/nf-core/hic' description = 'Analysis of Chromosome Conformation Capture data (Hi-C)' mainScript = 'main.nf' - nextflowVersion = '>=19.10.0' - version = '1.2.2' + nextflowVersion = '>=20.04.0' + version = '1.3.0dev' } // Function to ensure that resource requirements don't go beyond