Skip to content

Commit

Permalink
Merge pull request #186 from nf-core/dev
Browse files Browse the repository at this point in the history
1.1.1 - LATÜRNICH
  • Loading branch information
subwaystation authored Mar 15, 2024
2 parents 9740ffc + 5daf69e commit 7fb3047
Show file tree
Hide file tree
Showing 28 changed files with 132 additions and 88 deletions.
10 changes: 1 addition & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint"
"python.defaultInterpreterPath": "/opt/conda/bin/python"
},

// Add the IDs of extensions you want installed when the container is created.
Expand Down
14 changes: 8 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ 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 ;)

:::info
If you need help using or modifying nf-core/pangenome then the best place to ask is on the nf-core Slack [#pangenome](https://nfcore.slack.com/channels/pangenome) channel ([join our Slack here](https://nf-co.re/join/slack)).
:::
> [!NOTE]
> If you need help using or modifying nf-core/pangenome then the best place to ask is on the nf-core Slack [#pangenome](https://nfcore.slack.com/channels/pangenome) channel ([join our Slack here](https://nf-co.re/join/slack)).
## Contribution workflow

Expand All @@ -27,8 +26,11 @@ If you're not used to this workflow with git, you can start with some [docs from

## Tests

You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.
You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command:

```bash
nf-test test --profile debug,test,docker --verbose
```

When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
Expand Down Expand Up @@ -90,7 +92,7 @@ Once there, use `nf-core schema build` to add to `nextflow_schema.json`.

Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.

The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block.
The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block.

### Naming schemes

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/pang
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/pangenome/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/pangenome _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Ensure the test suite passes (`nf-test test main.nf.test -profile test,docker`).
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@922e5c8d5ac4e918107ec311d2ebbd65e5982b3d # v2
uses: seqeralabs/action-tower-launch@v2
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
Expand All @@ -28,7 +28,7 @@ jobs:
}
profiles: test_full

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
- uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
# Launch workflow using Tower CLI tool action
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@922e5c8d5ac4e918107ec311d2ebbd65e5982b3d # v2
uses: seqeralabs/action-tower-launch@v2
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
Expand All @@ -25,7 +25,7 @@ jobs:
}
profiles: test

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
- uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@b9f764e8ba5c76b712ace14ecbfcef0e40ae2dd8 # v1
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"

Expand All @@ -50,7 +50,7 @@ jobs:
strategy:
matrix:
parameters:
- '--vcf_spec "gi|568815561:#,gi|568815567:#"'
- '--vcf_spec "gi|568815561:5,gi|568815567:25"'
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
parameters:
- "--communities"
- "--communities --wfmash_chunks 2"
- '--communities --vcf_spec "gi|568815561:#,gi|568815567:#"'
- '--communities --vcf_spec "gi|568815561:5,gi|568815567:25"'
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Nextflow
uses: nf-core/setup-nextflow@b9f764e8ba5c76b712ace14ecbfcef0e40ae2dd8 # v1
uses: nf-core/setup-nextflow@v2

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@b9f764e8ba5c76b712ace14ecbfcef0e40ae2dd8 # v1
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-announcements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: get topics and convert to hashtags
id: get_topics
run: |
curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ' > $GITHUB_OUTPUT
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:
Expand Down
6 changes: 2 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ tasks:
vscode:
extensions: # based on nf-core.nf-core-extensionpack
- codezombiech.gitignore # Language support for .gitignore files
# - cssho.vscode-svgviewer # SVG viewer
- esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code
- eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed
- 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
# - 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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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).

## 1.1.1 - LATÜRNICH

This release fixes some important bugs:

- Per default, we set the number of mappings in `wfmash` to `1`. Previously, this was set to the given number of haplotypes.
- To complement the issue above, there is a new parameter `wfmash_n_mappings` with default `1`.
- `bcftools` in the `VG_DECONSTRUCT` module was updated to the most recent version `1.19` to prevent errors like `corrupted size vs. prev_size`.
- Fixed some problems with the delimiter in `VG_DECONSTRUCT` so that the parameters given by `--vcf-spec` are now applied correctly.
- Updated to nf-core template version 2.13.1

## 1.1.0 - Schmuddlweddr

This release mostly contains updates of the respective modules. Functional updates are the following:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

[![GitHub Actions CI Status](https://github.com/nf-core/pangenome/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/pangenome/actions/workflows/ci.yml)
[![GitHub Actions Linting Status](https://github.com/nf-core/pangenome/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/pangenome/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/pangenome/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.8202636-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.8202636)

[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
[![Launch on Nextflow Tower](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Nextflow%20Tower-%234256e7)](https://tower.nf/launch?pipeline=https://github.com/nf-core/pangenome)
[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://tower.nf/launch?pipeline=https://github.com/nf-core/pangenome)

[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23pangenome-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/pangenome)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)

Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/pangenome/releases/tag/1.1.0" target="_blank">nf-core/pangenome</a>
This report has been generated by the <a href="https://github.com/nf-core/pangenome/releases/tag/1.1.1" target="_blank">nf-core/pangenome</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/pangenome/1.1.0/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/pangenome/1.1.1/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-pangenome-methods-description":
order: -1000
Expand Down
2 changes: 1 addition & 1 deletion conf/hla.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process {
}

withName:'SMOOTHXG' {
cpus = 4
cpus = 8
memory = 8.GB
// container = "ghcr.io/pangenome/pggb:20230331171956507fc0"
}
Expand Down
12 changes: 8 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ process {
withName: WFMASH_MAP_ALIGN {
ext.args = {
[
"-n ${params.n_haplotypes - 1}",
"-n ${params.wfmash_n_mappings}",
"-s ${parse_int(params.wfmash_segment_length)}",
"-p ${params.wfmash_map_pct_id}",
params.wfmash_merge_segments ? "-M" : "",
Expand All @@ -114,6 +114,7 @@ process {
"${wfmash_sparse_map_cmd}",
params.wfmash_temp_dir ? "-B ${wfmash_temp_dir}" : "",
"-2 ${params.wfmash_hg_filter_ani_diff}",
"--lower-triangular",
].join(" ").trim()
}
publishDir = [
Expand All @@ -126,7 +127,7 @@ process {
withName: WFMASH_MAP {
ext.args = {
[
"-n ${params.n_haplotypes - 1}",
"-n ${params.wfmash_n_mappings}",
"-s ${parse_int(params.wfmash_segment_length)}",
"-p ${params.wfmash_map_pct_id}",
params.wfmash_merge_segments ? "-M" : "",
Expand All @@ -139,6 +140,7 @@ process {
params.wfmash_temp_dir ? "-B ${wfmash_temp_dir}" : "",
"-m",
"-2 ${params.wfmash_hg_filter_ani_diff}",
"--lower-triangular",
].join(" ").trim()
}
publishDir = [
Expand All @@ -151,7 +153,7 @@ process {
withName: WFMASH_MAP_COMMUNITY {
ext.args = {
[
"-n ${params.n_haplotypes - 1}",
"-n ${params.wfmash_n_mappings}",
"-s ${parse_int(params.wfmash_segment_length)}",
"-p ${params.wfmash_map_pct_id}",
params.wfmash_merge_segments ? "-M" : "",
Expand All @@ -164,6 +166,7 @@ process {
params.wfmash_temp_dir ? "-B ${wfmash_temp_dir}" : "",
"-m",
"-2 ${params.wfmash_hg_filter_ani_diff}",
"--lower-triangular",
].join(" ").trim()
}
publishDir = [
Expand All @@ -185,7 +188,7 @@ process {
withName: WFMASH_ALIGN {
ext.args = {
[
"-n ${params.n_haplotypes - 1}",
"-n ${params.wfmash_n_mappings}",
"-s ${parse_int(params.wfmash_segment_length)}",
"-p ${params.wfmash_map_pct_id}",
params.wfmash_merge_segments ? "-M" : "",
Expand All @@ -198,6 +201,7 @@ process {
params.wfmash_temp_dir ? "-B ${wfmash_temp_dir}" : "",
"--invert-filtering",
"-2 ${params.wfmash_hg_filter_ani_diff}",
"--lower-triangular",
].join(" ").trim()
}
publishDir = [
Expand Down
8 changes: 4 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"multiqc": {
"branch": "master",
"git_sha": "ccacf6f5de6df3bc6d73b665c1fd2933d8bbc290",
"git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a",
"installed_by": ["modules"]
},
"odgi/build": {
Expand Down Expand Up @@ -91,17 +91,17 @@
"nf-core": {
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "cd08c91373cd00a73255081340e4914485846ba1",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "262b17ed2aad591039f914951659177e6c39a8d8",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
},
"utils_nfvalidation_plugin": {
"branch": "master",
"git_sha": "cd08c91373cd00a73255081340e4914485846ba1",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
}
}
Expand Down
14 changes: 9 additions & 5 deletions modules/local/vg_deconstruct/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ process VG_DECONSTRUCT {
'https://depot.galaxyproject.org/singularity/pggb:0.5.3--hdfd78af_2':
'quay.io/biocontainers/pggb:0.5.3--hdfd78af_2' }"
*/
container "ghcr.io/pangenome/pggb:20230819064109936a2c"
container "ghcr.io/pangenome/pggb:20240313103308d2dc38"

input:
tuple val(meta), path(graph), val(vcf_spec)
Expand All @@ -47,16 +47,20 @@ process VG_DECONSTRUCT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
ref=\$(echo "$vcf_spec" | cut -f 1 -d:)
delim=\$(echo "$vcf_spec" | cut -f 2 -d:)
pop_length=\$(echo "$vcf_spec" | cut -f 3 -d:)
if [[ "$vcf_spec" == *":"* ]]; then
pop_length=\$(echo "$vcf_spec" | cut -f 2 -d:)
else
pop_length=""
fi
if [[ -z \$pop_length ]]; then
pop_length=0
fi
vcf="${graph}".\$(echo \$ref | tr '/|' '_').vcf
vg deconstruct -P \$ref -H \$delim -e -a -t "${task.cpus}" "${graph}" > \$vcf
vg deconstruct -P \$ref -H "#" -e -a -t "${task.cpus}" "${graph}" > \$vcf
bcftools stats \$vcf > \$vcf.stats
if [[ \$pop_length -gt 0 ]]; then
vcf_decomposed=${graph}.final.\$(echo \$ref | tr '/|' '_').decomposed.vcf
vcf_decomposed_tmp=\$vcf_decomposed.tmp.vcf
Expand All @@ -65,7 +69,7 @@ process VG_DECONSTRUCT {
#TODO: to remove when vcfwave will be bug-free
# The TYPE info sometimes is wrong/missing
# There are variants without the ALT allele
bcftools sort \$vcf_decomposed_tmp | bcftools annotate -x INFO/TYPE \$vcf_decomposed_tmp | awk '\$5 != "."' > \$vcf_decomposed
bcftools sort \$vcf_decomposed_tmp | bcftools annotate -x INFO/TYPE | awk '\$5 != "."' > \$vcf_decomposed
rm \$vcf_decomposed_tmp \$vcf.gz
bcftools stats \$vcf_decomposed > \$vcf_decomposed.stats
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/multiqc/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/nf-core/multiqc/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7fb3047

Please sign in to comment.