Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important! Template update for nf-core/tools v2.13 #3

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = 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
Expand All @@ -28,5 +33,5 @@ indent_size = unset
indent_style = unset

# ignore python
[*.{py}]
[*.{py,md}]
indent_style = unset
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@v2
uses: seqeralabs/action-tower-launch@922e5c8d5ac4e918107ec311d2ebbd65e5982b3d # v2
# TODO nf-core: You can customise AWS full pipeline tests as required
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
Expand All @@ -31,7 +31,7 @@ jobs:
}
profiles: test_full

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 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@v2
uses: seqeralabs/action-tower-launch@922e5c8d5ac4e918107ec311d2ebbd65e5982b3d # 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@v4
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Tower debug log file
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v2
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message: |
## This PR is against the `master` branch :x:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ jobs:
- "latest-everything"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

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

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
- 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."
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ name: Test successful pipeline download with 'nf-core download'
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
on:
workflow_dispatch:
inputs:
testbranch:
description: "The specific branch you wish to utilize for the test execution of nf-core download."
required: true
default: "dev"
pull_request:
types:
- opened
Expand All @@ -23,13 +28,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
uses: nf-core/setup-nextflow@b9f764e8ba5c76b712ace14ecbfcef0e40ae2dd8 # v1

- uses: actions/setup-python@v5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: "3.11"
architecture: "x64"
- uses: eWaterCycle/setup-singularity@v7
- uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7
with:
singularity-version: 3.8.3

Expand All @@ -42,13 +47,13 @@ jobs:
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
echo "REPO_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV}
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}

- name: Download the pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
run: |
nf-core download ${{ env.REPO_LOWERCASE }} \
nf-core download ${{ env.REPO_LOWERCASE }} \
--revision ${{ env.REPO_BRANCH }} \
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
--compress "none" \
Expand All @@ -64,4 +69,4 @@ jobs:
env:
NXF_SINGULARITY_CACHEDIR: ./
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
12 changes: 6 additions & 6 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: 3.11
cache: "pip"
Expand All @@ -32,12 +32,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

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

- uses: actions/setup-python@v5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: "3.11"
architecture: "x64"
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: linting-logs
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@f6b0bace624032e30a85a8fd9c1a7f8f611f5737 # v3
with:
workflow: linting.yml
workflow_conclusion: completed
Expand All @@ -21,7 +21,7 @@ jobs:
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release-announcements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
toot:
runs-on: ubuntu-latest
steps:
- 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

- uses: rzr/fediverse-action@master
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
Expand All @@ -20,11 +25,13 @@ jobs:

Please see the changelog: ${{ github.event.release.html_url }}

${{ steps.get_topics.outputs.GITHUB_OUTPUT }} #nfcore #openscience #nextflow #bioinformatics

send-tweet:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down Expand Up @@ -56,7 +63,7 @@ jobs:
bsky-post:
runs-on: ubuntu-latest
steps:
- uses: zentered/[email protected]
- 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 }}!
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</picture>
</h1>

[![GitHub Actions CI Status](https://github.com/nf-core/variantbenchmarking/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/variantbenchmarking/actions?query=workflow%3A%22nf-core+CI%22)
[![GitHub Actions Linting Status](https://github.com/nf-core/variantbenchmarking/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/variantbenchmarking/actions?query=workflow%3A%22nf-core+linting%22)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/variantbenchmarking/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
[![GitHub Actions CI Status](https://github.com/nf-core/variantbenchmarking/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/variantbenchmarking/actions/workflows/ci.yml)
[![GitHub Actions Linting Status](https://github.com/nf-core/variantbenchmarking/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/variantbenchmarking/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/variantbenchmarking/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)

[![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/)
Expand Down
2 changes: 1 addition & 1 deletion assets/email_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="description" content="nf-core/variantbenchmarking: Nextflow variant benchmarking pipeline">
<meta name="description" content="nf-core/variantbenchmarking: Master benchmarking pipeline for Structural Variant callers ">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the term "master" in the sense of ruler, has some bad connotation. Maybe a different term would fit better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pipeline might aim to target more than structural variants, so maybe we should also not include that part

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! We'll be sure to fix this before the release

<title>nf-core/variantbenchmarking Pipeline Report</title>
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ report_section_order:
order: -1002

export_plots: true

disable_version_detection: true
56 changes: 29 additions & 27 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/nf-core/variantbenchmarking/master/assets/schema_input.json",
"title": "nf-core/variantbenchmarking pipeline - params.input schema",
"description": "Schema for the file provided with params.input",
"type": "array",
"items": {
"type": "object",
"properties": {
"test_vcf": {
"type": "string",
"pattern": "",
"errorMessage": "Test VCF must be provided, cannot contain spaces and must have extension '.vcf.gz'"
},
"caller": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Name of the variant caller used to generate test file"
},
"vartype": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Variant type to benchmark"
}

},
"required": ["test_vcf","caller","vartype"]
}
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/nf-core/variantbenchmarking/master/assets/schema_input.json",
"title": "nf-core/variantbenchmarking pipeline - params.input schema",
"description": "Schema for the file provided with params.input",
"type": "array",
"items": {
"type": "object",
"properties": {
"test_vcf": {
"type": "string",
"pattern": "\\S+\\.vcf(\\.gz)?$",
"format": "file-path",
"errorMessage": "Test VCF must be provided, cannot contain spaces and must have extension '.vcf.gz'"
},
"caller": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Name of the variant caller used to generate test file",
"meta": ["id"]
},
"vartype": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Variant type to benchmark",
"meta": ["vartype"]
}
},
"required": ["test_vcf", "caller", "vartype"]
}
}
1 change: 0 additions & 1 deletion assets/svync/delly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ format:
number: 2
type: integer
description: Split-read support for the ref and alt alleles in the order listed

1 change: 0 additions & 1 deletion assets/svync/gridss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ format:
number: 2
type: integer
description: Split-read support for the ref and alt alleles in the order listed

1 change: 0 additions & 1 deletion assets/svync/manta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ format:
number: 2
type: integer
description: Split-read support for the ref and alt alleles in the order listed

1 change: 0 additions & 1 deletion assets/svync/smoove.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ format:
number: 2
type: integer
description: Split-read support for the ref and alt alleles in the order listed

4 changes: 2 additions & 2 deletions bin/add_svtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
for v in in_vcf:
svlen=(len(v.alts[0])-len(v.ref))
limit=args.svlength

if (svlen < -1*limit):
v.info.update({'SVTYPE':"DEL"})
v.info.update({'SVLEN':svlen})
Expand All @@ -50,7 +50,7 @@
counter=counter+1
else:
anno_vcf.write(v)

in_vcf.close()
anno_vcf.close()
logger.info('Finished adding SVTYE/SVLEN to VCF: {}'.format(counter))
Expand Down
8 changes: 4 additions & 4 deletions bin/annotate_repeat_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def print_AF(in_vcf,samplerep,repeatmask,segdup):
simple_repeat=temp1.iloc[0].period
else:
simple_repeat='None'

temp2=repeatmask[(repeatmask['genoName']== v.chrom) &( (( v.start > repeatmask['genoStart']-1 ) & ( v.start < repeatmask['genoEnd'] +1 ) )| (( v.stop > repeatmask['genoStart'] -1) & ( v.stop < repeatmask['genoEnd'] +1 ))) ]

if len(temp2) > 0:
Expand All @@ -40,7 +40,7 @@ def print_AF(in_vcf,samplerep,repeatmask,segdup):
else:
repname='None'
repclass='None'

temp3=segdup[(segdup['chrom']== v.chrom) &( (( v.start > segdup['chromStart']-1 ) & ( v.start < segdup['chromEnd'] +1 ) )| (( v.stop > segdup['chromStart'] -1) & ( v.stop < segdup['chromEnd'] +1 ))) ]
if len(temp3) > 0:
segdups=temp3.iloc[0].fracMatch
Expand All @@ -53,13 +53,13 @@ def print_AF(in_vcf,samplerep,repeatmask,segdup):
print('DEL', v.ref, len(v.alts[0])- len(v.ref) , v.info['AF'][0],simple_repeat,repname, repclass,segdups, file=out_file)
else:
print('DEL', '...', len(v.alts[0])- len(v.ref) , v.info['AF'][0],simple_repeat,repname, repclass,segdups, file=out_file)

elif len(v.alts[0]) - len(v.ref) > 49:
if len(v.ref) - len(v.alts[0]) < 1001:
print('INS', v.alts[0],len(v.alts[0]) - len(v.ref), v.info['AF'][0],simple_repeat,repname, repclass,segdups, file=out_file)
else:
print('INS', '...',len(v.alts[0]) - len(v.ref), v.info['AF'][0],simple_repeat,repname, repclass,segdups, file=out_file)

else:
continue

Expand Down
Loading
Loading