diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 682f2856ac0470cb4e5f67993bd4b8044fa7f633..78c45d55dcf3cc4514fc8facc7a7a21be8f5d220 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Let us know about something that is not working +about: Report something that is broken or incorrect labels: bug --- 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 931688889b86d72d3cdb80b3239675b745b2d0fc..1a92849358ce849acd440d8a6806aeeb8a8e92fc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest a new feature for this pipeline +about: Suggest an idea for the nf-core website labels: enhancement --- diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index d5cef6aca217882a56da77f50ff8c2f96ea535b5..879955ba790402ab7ada28cc54320644e27ec0cb 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 b91b9269f62a65f9a450f3b1a8af35604acdd523..ee179a28749abcadb808634e8f682575513f8a99 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 896e2aee13aff5506249910ead3deb2fb339b645..f7e6e00ae0bbef6fc886b20d0e30c766931cfe88 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 7a41b0e744fdc86c94c3a83df5cb0cc59c07ed0f..6367daba8be05f3cb37649750dad86f8dc88a3c6 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -36,6 +36,8 @@ jobs: - name: Check out pipeline code uses: actions/checkout@v2 - name: Install Nextflow + env: + CAPSULE_LOG: none run: | wget -qO- get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ @@ -55,11 +57,20 @@ 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_release.yml b/.github/workflows/push_dockerhub_release.yml new file mode 100644 index 0000000000000000000000000000000000000000..eda09ccfb6fcdd5791c56b6875343dc2bbf9c8c0 --- /dev/null +++ b/.github/workflows/push_dockerhub_release.yml @@ -0,0 +1,29 @@ +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: + release: + types: [published] + +jobs: + push_dockerhub: + 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' }} + 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:latest + + - name: Push Docker image to DockerHub (release) + run: | + echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin + docker push nfcore/hic:latest + docker tag nfcore/hic:latest nfcore/hic:${{ github.event.release.tag_name }} + docker push nfcore/hic:${{ github.event.release.tag_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 03641f646ff9f2a0bf8cd4fa0960a14d84f56a65..6b382405ecda8f8b743e48c8ca2e30d79e2d0807 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.3.0dev +## v1.3.0dev - 2020-11-01 * New `--digestion` parameter to automatically set the restriction_site and ligation_site motifs * New `--keep_multi` and `keep_dup` options. Default: false diff --git a/Dockerfile b/Dockerfile index 20b92a846db7a82e4f361aa11bc3c82b8e7e3a0e..422e2e16938a79677dc89d9e0dce16d24d1e9a4c 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" diff --git a/README.md b/README.md index 36b30b284d5422dce15ce8bfd4498e97b66fd37d..589bcb3d57346d43649ca7881b90bf30caa1137f 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/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/main.nf b/main.nf index 5109b84e90a662b73f51581da9d0d4aa43e206e3..46b3d9b9920442e0cd23a7fd8717adddddda06c5 100644 --- a/main.nf +++ b/main.nf @@ -136,10 +136,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) /********************************************************** * SET UP CHANNELS @@ -969,18 +969,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 3a75a34e6ecfa9fc434a4ce8586e58f430c34f1f..6e69e46d4f8b51058abd1e92f373a2307294f19c 100644 --- a/nextflow.config +++ b/nextflow.config @@ -114,7 +114,7 @@ try { // Create profiles profiles { - conda { process.conda = "$baseDir/environment.yml" } + conda { process.conda = "$projectDir/environment.yml" } debug { process.beforeScript = 'echo $HOSTNAME' } docker { docker.enabled = true @@ -132,6 +132,7 @@ profiles { podman.enabled = true } test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } } // Load igenomes.config if required @@ -172,7 +173,7 @@ manifest { homePage = 'https://github.com/nf-core/hic' description = 'Analysis of Chromosome Conformation Capture data (Hi-C)' mainScript = 'main.nf' - nextflowVersion = '>=19.10.0' + nextflowVersion = '>=20.04.0' version = '1.3.0dev' }