From 22ba809f9d1a8ab49cb81e9b10d4dc9840418ae8 Mon Sep 17 00:00:00 2001 From: FELIXANTOINE Date: Mon, 8 Jul 2024 14:23:27 -0400 Subject: [PATCH 1/5] Refactor: Removed .devcontainer and .dockstore Also added some caveats to contribution and PR template file Ignored some lint tests for modified or removed files --- .devcontainer/devcontainer.json | 20 -------------------- .github/.dockstore.yml | 6 ------ .github/CONTRIBUTING.md | 20 ++++---------------- .github/PULL_REQUEST_TEMPLATE.md | 5 +++-- .github/workflows/linting_comment.yml | 3 ++- .nf-core.yml | 4 ++++ 6 files changed, 13 insertions(+), 45 deletions(-) delete mode 100644 .devcontainer/devcontainer.json delete mode 100644 .github/.dockstore.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index b290e09..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "nfcore", - "image": "nfcore/gitpod:latest", - "remoteUser": "gitpod", - "runArgs": ["--privileged"], - - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "python.defaultInterpreterPath": "/opt/conda/bin/python" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } -} diff --git a/.github/.dockstore.yml b/.github/.dockstore.yml deleted file mode 100644 index 191fabd..0000000 --- a/.github/.dockstore.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Dockstore config version, not pipeline version -version: 1.2 -workflows: - - subclass: nfl - primaryDescriptorPath: /nextflow.config - publish: True diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f270e63..6196020 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,6 +9,9 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) +Since this repository is in construction, some of the points below might not apply yet (ex: tests, linter, naming conventions, versioning). +Make sure to do the maximum possible. If you are not sure about current standards or need support, you can ask help on the [#bioinfo](https://cr-ste-justine.slack.com/archives/C074VMACUD9slack) slack channel. + ## Contribution workflow If you'd like to write some code for ferlab/postprocessing, the standard workflow is as follows: @@ -72,8 +75,7 @@ If you wish to contribute a new step, please use the following coding standards: 6. Add sanity checks and validation for all relevant parameters. 7. Perform local tests to validate that the new code works as expected. 8. If applicable, add a new test command in `.github/workflow/ci.yml`. -9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. -10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. +9. Add a description of the output files if relevant to `docs/output.md`. ### Default values @@ -102,17 +104,3 @@ If you are using a new feature from core Nextflow, you may bump the minimum requ For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). -## GitHub Codespaces - -This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. - -To get started: - -- Open the repo in [Codespaces](https://github.com/ferlab/postprocessing/codespaces) -- Tools installed - - nf-core - - Nextflow - -Devcontainer specs: - -- [DevContainer config](.devcontainer/devcontainer.json) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f0122c8..f96ab1f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,10 +4,11 @@ Many thanks for contributing to ferlab/postprocessing! Please fill in the appropriate checklist below (delete whatever is not relevant). +Since this repository is in construction, some of the points below regarding tests and linter might not apply yet. Make sure +to do the maximum possible. For now, the tests are performed manually. Add a description of your tests in your pull request. +You can ask help on the [#bioinfo](https://cr-ste-justine.slack.com/archives/C074VMACUD9slack) channel. These are the most common things requested on pull requests (PRs). -Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release. - Learn more about contributing: [CONTRIBUTING.md](https://github.com/ferlab/postprocessing/tree/master/.github/CONTRIBUTING.md) --> diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 40acc23..4ad67ab 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -1,7 +1,8 @@ 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 - +permissions: + pull-requests: write on: workflow_run: workflows: ["nf-core linting"] diff --git a/.nf-core.yml b/.nf-core.yml index 6bba344..911bed0 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -7,12 +7,16 @@ lint: - .github/ISSUE_TEMPLATE/config.yml - .github/workflows/awstest.yml - .github/workflows/awsfulltest.yml + - .github/.dockstore.yml files_unchanged: - CODE_OF_CONDUCT.md - assets/nf-core-postprocessing_logo_light.png - docs/images/nf-core-postprocessing_logo_light.png - docs/images/nf-core-postprocessing_logo_dark.png - .github/ISSUE_TEMPLATE/bug_report.yml + - .github/CONTRIBUTING.md + - .github/PULL_REQUEST_TEMPLATE.md + - .github/workflows/linting_comment.yml multiqc_config: - report_comment nextflow_config: From e1ad328ed769681c001174cc06b14a2536071623 Mon Sep 17 00:00:00 2001 From: FELIXANTOINE Date: Mon, 8 Jul 2024 15:48:18 -0400 Subject: [PATCH 2/5] Refactor: Removes the prettier check, The mirror seems deprecated and is not consistent with prettier-vsc. Ignored several more lint test for removed files. --- .github/workflows/linting_comment.yml | 2 +- .pre-commit-config.yaml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 4ad67ab..a5958a1 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -22,7 +22,7 @@ jobs: run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - name: Post PR comment - uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2 + uses: marocchino/sticky-pull-request-comment@v2 # v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.pr_number.outputs.pr_number }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4dc0f1d..0b86ab1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,4 @@ repos: - - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.1.0" - hooks: - - id: prettier - additional_dependencies: - - prettier@3.2.5 - - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: "2.7.3" hooks: From 56574c2fef6ec74a03d9361c05c19ca944973fb1 Mon Sep 17 00:00:00 2001 From: FELIXANTOINE Date: Mon, 8 Jul 2024 16:28:57 -0400 Subject: [PATCH 3/5] Refactor: Removes the faulty "post PR" action Updated the nf-core.yml to ignore related lint test --- .editorconfig | 33 ----------- .github/workflows/linting_comment.yml | 11 ---- .gitpod.yml | 20 ------- .nf-core.yml | 7 +++ .pre-commit-config.yaml | 6 -- .prettierignore | 12 ---- .prettierrc.yml | 1 - LICENSE | 21 ------- assets/email_template.html | 53 ------------------ assets/email_template.txt | 31 ----------- assets/methods_description_template.yml | 29 ---------- assets/sendmail_template.txt | 53 ------------------ modules.json | 74 ++++++++++++------------- tower.yml | 5 -- 14 files changed, 44 insertions(+), 312 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .gitpod.yml delete mode 100644 .pre-commit-config.yaml delete mode 100644 .prettierignore delete mode 100644 .prettierrc.yml delete mode 100644 LICENSE delete mode 100644 assets/email_template.html delete mode 100644 assets/email_template.txt delete mode 100644 assets/methods_description_template.yml delete mode 100644 assets/sendmail_template.txt delete mode 100644 tower.yml diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 72dda28..0000000 --- a/.editorconfig +++ /dev/null @@ -1,33 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_size = 4 -indent_style = space - -[*.{md,yml,yaml,html,css,scss,js}] -indent_size = 2 - -# These files are edited and tested upstream in nf-core/modules -[/modules/nf-core/**] -charset = unset -end_of_line = unset -insert_final_newline = unset -trim_trailing_whitespace = unset -indent_style = unset -[/subworkflows/nf-core/**] -charset = unset -end_of_line = unset -insert_final_newline = unset -trim_trailing_whitespace = unset -indent_style = unset - -[/assets/email*] -indent_size = unset - -# ignore python and markdown -[*.{py,md}] -indent_style = unset diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index a5958a1..17eed45 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -16,14 +16,3 @@ jobs: with: workflow: linting.yml workflow_conclusion: completed - - - name: Get PR number - id: pr_number - run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - - - name: Post PR comment - uses: marocchino/sticky-pull-request-comment@v2 # v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - number: ${{ steps.pr_number.outputs.pr_number }} - path: linting-logs/lint_results.md diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 105a182..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: nfcore/gitpod:latest -tasks: - - name: Update Nextflow and setup pre-commit - command: | - pre-commit install --install-hooks - nextflow self-update - - name: unset JAVA_TOOL_OPTIONS - command: | - unset JAVA_TOOL_OPTIONS - -vscode: - extensions: # based on nf-core.nf-core-extensionpack - - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code - - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files - - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar - - mechatroner.rainbow-csv # Highlight columns in csv files in different colors - # - nextflow.nextflow # Nextflow syntax highlighting - - oderwat.indent-rainbow # Highlight indentation level - - streetsidesoftware.code-spell-checker # Spelling checker for source code - - charliermarsh.ruff # Code linter Ruff diff --git a/.nf-core.yml b/.nf-core.yml index 911bed0..1e3a1b1 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -8,6 +8,13 @@ lint: - .github/workflows/awstest.yml - .github/workflows/awsfulltest.yml - .github/.dockstore.yml + - .editorconfig + - .prettierignore + - .prettierrc.yml + - LICENSE + - assets/email_template.html + - assets/email_template.txt + - assets/sendmail_template.txt files_unchanged: - CODE_OF_CONDUCT.md - assets/nf-core-postprocessing_logo_light.png diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 0b86ab1..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -repos: - - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: "2.7.3" - hooks: - - id: editorconfig-checker - alias: ec diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 437d763..0000000 --- a/.prettierignore +++ /dev/null @@ -1,12 +0,0 @@ -email_template.html -adaptivecard.json -slackreport.json -.nextflow* -work/ -data/ -results/ -.DS_Store -testing/ -testing* -*.pyc -bin/ diff --git a/.prettierrc.yml b/.prettierrc.yml deleted file mode 100644 index c81f9a7..0000000 --- a/.prettierrc.yml +++ /dev/null @@ -1 +0,0 @@ -printWidth: 120 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index b90c546..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Damien Geneste, David Morais, Felix-Antoine Le Sieur, Jeremy Costanza, Lysiane Bouchard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/assets/email_template.html b/assets/email_template.html deleted file mode 100644 index 7ec7cda..0000000 --- a/assets/email_template.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - ferlab/postprocessing Pipeline Report - - -
- - - -

ferlab/postprocessing ${version}

-

Run Name: $runName

- -<% if (!success){ - out << """ -
-

ferlab/postprocessing execution completed unsuccessfully!

-

The exit status of the task that caused the workflow execution to fail was: $exitStatus.

-

The full error message was:

-
${errorReport}
-
- """ -} else { - out << """ -
- ferlab/postprocessing execution completed successfully! -
- """ -} -%> - -

The workflow was completed at $dateComplete (duration: $duration)

-

The command used to launch the workflow was as follows:

-
$commandLine
- -

Pipeline Configuration:

- - - <% out << summary.collect{ k,v -> "" }.join("\n") %> - -
$k
$v
- -

ferlab/postprocessing

-

https://github.com/ferlab/postprocessing

- -
- - - diff --git a/assets/email_template.txt b/assets/email_template.txt deleted file mode 100644 index f223313..0000000 --- a/assets/email_template.txt +++ /dev/null @@ -1,31 +0,0 @@ -Run Name: $runName - -<% if (success){ - out << "## ferlab/postprocessing execution completed successfully! ##" -} else { - out << """#################################################### -## ferlab/postprocessing execution completed unsuccessfully! ## -#################################################### -The exit status of the task that caused the workflow execution to fail was: $exitStatus. -The full error message was: - -${errorReport} -""" -} %> - - -The workflow was completed at $dateComplete (duration: $duration) - -The command used to launch the workflow was as follows: - - $commandLine - - - -Pipeline Configuration: ------------------------ -<% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %> - --- -ferlab/postprocessing -https://github.com/ferlab/postprocessing diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml deleted file mode 100644 index d3e036a..0000000 --- a/assets/methods_description_template.yml +++ /dev/null @@ -1,29 +0,0 @@ -id: "ferlab-postprocessing-methods-description" -description: "Suggested text and references to use when describing pipeline usage within the methods section of a publication." -section_name: "ferlab/postprocessing Methods Description" -section_href: "https://github.com/ferlab/postprocessing" -plot_type: "html" -## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline -## You inject any metadata in the Nextflow '${workflow}' object -data: | -

Methods

-

Data was processed using ferlab/postprocessing v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020), utilising reproducible software environments from the Bioconda (Grüning et al., 2018) and Biocontainers (da Veiga Leprevost et al., 2017) projects.

-

The pipeline was executed with Nextflow v${workflow.nextflow.version} (Di Tommaso et al., 2017) with the following command:

-
${workflow.commandLine}
-

${tool_citations}

-

References

-
    -
  • Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. doi: 10.1038/nbt.3820
  • -
  • Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. doi: 10.1038/s41587-020-0439-x
  • -
  • Grüning, B., Dale, R., Sjödin, A., Chapman, B. A., Rowe, J., Tomkins-Tinch, C. H., Valieris, R., Köster, J., & Bioconda Team. (2018). Bioconda: sustainable and comprehensive software distribution for the life sciences. Nature Methods, 15(7), 475–476. doi: 10.1038/s41592-018-0046-7
  • -
  • da Veiga Leprevost, F., Grüning, B. A., Alves Aflitos, S., Röst, H. L., Uszkoreit, J., Barsnes, H., Vaudel, M., Moreno, P., Gatto, L., Weber, J., Bai, M., Jimenez, R. C., Sachsenberg, T., Pfeuffer, J., Vera Alvarez, R., Griss, J., Nesvizhskii, A. I., & Perez-Riverol, Y. (2017). BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics (Oxford, England), 33(16), 2580–2582. doi: 10.1093/bioinformatics/btx192
  • - ${tool_bibliography} -
-
-
Notes:
-
    - ${nodoi_text} -
  • The command above does not include parameters contained in any configs or profiles that may have been used. Ensure the config file is also uploaded with your publication!
  • -
  • You should also cite all software used within this run. Check the "Software Versions" of this report to get version information.
  • -
-
diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt deleted file mode 100644 index 8cd0c6b..0000000 --- a/assets/sendmail_template.txt +++ /dev/null @@ -1,53 +0,0 @@ -To: $email -Subject: $subject -Mime-Version: 1.0 -Content-Type: multipart/related;boundary="nfcoremimeboundary" - ---nfcoremimeboundary -Content-Type: text/html; charset=utf-8 - -$email_html - ---nfcoremimeboundary -Content-Type: image/png;name="ferlab-postprocessing_logo.png" -Content-Transfer-Encoding: base64 -Content-ID: -Content-Disposition: inline; filename="ferlab-postprocessing_logo_light.png" - -<% out << new File("$projectDir/assets/ferlab-postprocessing_logo_light.png"). - bytes. - encodeBase64(). - toString(). - tokenize( '\n' )*. - toList()*. - collate( 76 )*. - collect { it.join() }. - flatten(). - join( '\n' ) %> - -<% -if (mqcFile){ -def mqcFileObj = new File("$mqcFile") -if (mqcFileObj.length() < mqcMaxSize){ -out << """ ---nfcoremimeboundary -Content-Type: text/html; name=\"multiqc_report\" -Content-Transfer-Encoding: base64 -Content-ID: -Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" - -${mqcFileObj. - bytes. - encodeBase64(). - toString(). - tokenize( '\n' )*. - toList()*. - collate( 76 )*. - collect { it.join() }. - flatten(). - join( '\n' )} -""" -}} -%> - ---nfcoremimeboundary-- diff --git a/modules.json b/modules.json index d0de866..46f1238 100644 --- a/modules.json +++ b/modules.json @@ -1,41 +1,41 @@ { - "name": "ferlab/postprocessing", - "homePage": "https://github.com/ferlab/postprocessing", - "repos": { - "https://github.com/nf-core/modules.git": { - "modules": { - "nf-core": { - "fastqc": { - "branch": "master", - "git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd", - "installed_by": ["modules"] - }, - "multiqc": { - "branch": "master", - "git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a", - "installed_by": ["modules"] - } - } - }, - "subworkflows": { - "nf-core": { - "utils_nextflow_pipeline": { - "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", - "installed_by": ["subworkflows"] - }, - "utils_nfcore_pipeline": { - "branch": "master", - "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", - "installed_by": ["subworkflows"] - }, - "utils_nfvalidation_plugin": { - "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", - "installed_by": ["subworkflows"] - } - } - } + "name": "ferlab/postprocessing", + "homePage": "https://github.com/ferlab/postprocessing", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "fastqc": { + "branch": "master", + "git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd", + "installed_by": ["modules"] + }, + "multiqc": { + "branch": "master", + "git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a", + "installed_by": ["modules"] + } } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "installed_by": ["subworkflows"] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", + "installed_by": ["subworkflows"] + }, + "utils_nfvalidation_plugin": { + "branch": "master", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "installed_by": ["subworkflows"] + } + } + } } + } } diff --git a/tower.yml b/tower.yml deleted file mode 100644 index 787aedf..0000000 --- a/tower.yml +++ /dev/null @@ -1,5 +0,0 @@ -reports: - multiqc_report.html: - display: "MultiQC HTML report" - samplesheet.csv: - display: "Auto-created samplesheet with collated metadata and FASTQ paths" From b73876a7110536bf8e00d344750915853b02c529 Mon Sep 17 00:00:00 2001 From: FELIXANTOINE Date: Wed, 10 Jul 2024 16:17:58 -0400 Subject: [PATCH 4/5] Refactor: Removed workflow and notif files Removed files related to disabled github actions and email notifications --- .github/workflows/clean-up.yml | 24 ------- .github/workflows/linting_comment.yml | 18 ----- .github/workflows/release-announcements.yml | 75 --------------------- .nf-core.yml | 1 + 4 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 .github/workflows/clean-up.yml delete mode 100644 .github/workflows/linting_comment.yml delete mode 100644 .github/workflows/release-announcements.yml diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml deleted file mode 100644 index 0b6b1f2..0000000 --- a/.github/workflows/clean-up.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "Close user-tagged issues and PRs" -on: - schedule: - - cron: "0 0 * * 0" # Once a week - -jobs: - clean-up: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 - with: - stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days." - stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful." - close-issue-message: "This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity." - days-before-stale: 30 - days-before-close: 20 - days-before-pr-close: -1 - any-of-labels: "awaiting-changes,awaiting-feedback" - exempt-issue-labels: "WIP" - exempt-pr-labels: "WIP" - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml deleted file mode 100644 index 17eed45..0000000 --- a/.github/workflows/linting_comment.yml +++ /dev/null @@ -1,18 +0,0 @@ -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 -permissions: - pull-requests: write -on: - workflow_run: - workflows: ["nf-core linting"] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Download lint results - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3 - with: - workflow: linting.yml - workflow_conclusion: completed diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml deleted file mode 100644 index 03ecfcf..0000000 --- a/.github/workflows/release-announcements.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: release-announcements -# Automatic release toot and tweet anouncements -on: - release: - types: [published] - workflow_dispatch: - -jobs: - toot: - runs-on: ubuntu-latest - steps: - - name: get topics and convert to hashtags - id: get_topics - run: | - echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" >> $GITHUB_OUTPUT - - - uses: rzr/fediverse-action@master - with: - access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} - host: "mstdn.science" # custom host if not "mastodon.social" (default) - # GitHub event payload - # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release - message: | - Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! - - Please see the changelog: ${{ github.event.release.html_url }} - - ${{ steps.get_topics.outputs.topics }} #nfcore #openscience #nextflow #bioinformatics - - send-tweet: - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 - with: - python-version: "3.10" - - name: Install dependencies - run: pip install tweepy==4.14.0 - - name: Send tweet - shell: python - run: | - import os - import tweepy - - client = tweepy.Client( - access_token=os.getenv("TWITTER_ACCESS_TOKEN"), - access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"), - consumer_key=os.getenv("TWITTER_CONSUMER_KEY"), - consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"), - ) - tweet = os.getenv("TWEET") - client.create_tweet(text=tweet) - env: - TWEET: | - Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! - - Please see the changelog: ${{ github.event.release.html_url }} - TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} - TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} - TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} - TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} - - bsky-post: - runs-on: ubuntu-latest - steps: - - uses: zentered/bluesky-post-action@80dbe0a7697de18c15ad22f4619919ceb5ccf597 # v0.1.0 - with: - post: | - Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! - - Please see the changelog: ${{ github.event.release.html_url }} - env: - BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} - BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} - # diff --git a/.nf-core.yml b/.nf-core.yml index 1e3a1b1..257e8f2 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -7,6 +7,7 @@ lint: - .github/ISSUE_TEMPLATE/config.yml - .github/workflows/awstest.yml - .github/workflows/awsfulltest.yml + - .github/workflows/linting_comment.yml - .github/.dockstore.yml - .editorconfig - .prettierignore From f56890f96da31db3ae030161bf0d5fa82b1722ab Mon Sep 17 00:00:00 2001 From: FELIXANTOINE Date: Thu, 11 Jul 2024 14:58:19 -0400 Subject: [PATCH 5/5] Doc: Lysiane's comments Changed wording in CONTRIBUTING.md, updated usage.md, removed the fasta samplesheet Doc: Updated changelog --- .github/CONTRIBUTING.md | 8 ++++---- CHANGELOG.md | 1 + assets/samplesheet.csv | 3 --- docs/usage.md | 40 ++-------------------------------------- 4 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 assets/samplesheet.csv diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6196020..9ee3f79 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -20,7 +20,7 @@ If you'd like to write some code for ferlab/postprocessing, the standard workflo 2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [ferlab/postprocessing repository](https://github.com/ferlab/postprocessing) to your GitHub account 3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) 4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). -5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged +5. Submit a Pull Request against the main branch and wait for the code to be reviewed and merged If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). @@ -51,13 +51,13 @@ Each `nf-core` pipeline should be set up with a minimal set of test-data. If there are any failures then the automated tests fail. These tests are run both with the latest available version of `Nextflow` and also the minimum required version that is stated in the pipeline code. -## Patch +## Hotfix :warning: Only in the unlikely and regretful event of a release happening with a bug. -- On your own fork, make a new branch `patch` based on `upstream/master`. +- On your own fork, make a new branch `fix` based on `origin/main`. - Fix the bug, and bump version (X.Y.Z+1). -- A PR should be made on `master` from patch to directly this particular bug. +- A PR should be made on `main` from fix to directly this particular bug. ## Pipeline contribution conventions diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a82ea..81fb67f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,4 +21,5 @@ Initial release of ferlab/postprocessing, created with the [nf-core](https://nf- ### `Removed` [#1](https://github.com/FelixAntoineLeSieur/Post-processing-Pipeline/pull/1) Removed input_schema [#2](https://github.com/FelixAntoineLeSieur/Post-processing-Pipeline/pull/2) Removed V1 format input. V2 is the only accepted format. +[#5](https://github.com/Ferlab-Ste-Justine/Post-processing-Pipeline/pull/5) Removed many files related to workflows and email notifications diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv deleted file mode 100644 index 5f653ab..0000000 --- a/assets/samplesheet.csv +++ /dev/null @@ -1,3 +0,0 @@ -sample,fastq_1,fastq_2 -SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz -SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz, diff --git a/docs/usage.md b/docs/usage.md index 6b16ba3..cc216d8 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -8,54 +8,18 @@ ## Samplesheet input -You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a tab-separated file with the first column being the family ID. There are 2 possible format, V1 and V2 (See README for details). V1 includes only the family ID and the sample files as columns, while V2 has the sequencingType as a second column in addition the the familyID and sample files. +You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use the --input parameter to specify its location. The samplesheet has to be a tab-separated file (.tsv) with the first column being the family ID and the second being the sequencing type (either Whole Genome Sequencing (WGS) or Whole Exome Sequencing (WES)). Use the following columns to supply the paths to the gvcfs files for the same familyID. ```bash --input '[path to samplesheet file]' ``` -### Multiple runs of the same sample - -The `sample` identifiers have to be the same when you have re-sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will concatenate the raw reads before performing any downstream analysis. Below is an example for the same sample sequenced across 3 lanes: - -```csv title="samplesheet.csv" -sample,fastq_1,fastq_2 -CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz -CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz -CONTROL_REP1,AEG588A1_S1_L004_R1_001.fastq.gz,AEG588A1_S1_L004_R2_001.fastq.gz -``` - -### Full samplesheet - -The pipeline will auto-detect whether a sample is single- or paired-end using the information provided in the samplesheet. The samplesheet can have as many columns as you desire, however, there is a strict requirement for the first 3 columns to match those defined in the table below. - -A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice. - -```csv title="samplesheet.csv" -sample,fastq_1,fastq_2 -CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz -CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz -CONTROL_REP3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz -TREATMENT_REP1,AEG588A4_S4_L003_R1_001.fastq.gz, -TREATMENT_REP2,AEG588A5_S5_L003_R1_001.fastq.gz, -TREATMENT_REP3,AEG588A6_S6_L003_R1_001.fastq.gz, -TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz, -``` - -| Column | Description | -| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sample` | Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (`_`). | -| `fastq_1` | Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | -| `fastq_2` | Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | - -An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. - ## Running the pipeline The typical command for running the pipeline is as follows: ```bash -nextflow run ferlab/postprocessing --input ./samplesheet.csv --outdir ./results --genome GRCh37 -profile docker +nextflow run ferlab/postprocessing --input ./samplesheet.tsv --outdir ./results --genome GRCh37 -profile docker ``` This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles.