Skip to content

Commit

Permalink
Merge branch 'master' into for_loop_removal
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse authored Oct 10, 2024
2 parents 5d0f0ab + d7462e7 commit 0a2da6b
Show file tree
Hide file tree
Showing 180 changed files with 5,005 additions and 2,222 deletions.
1,116 changes: 13 additions & 1,103 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions .github/scripts/wave_singularity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "httpx",
# ]
# ///

import logging

import httpx

logger = logging.getLogger(__name__)

image_url = "oras://community.wave.seqera.io/library/pybedtools_bedtools_htslib_pip_pypints:aa20de1f1b5ddb30"

if image_url.startswith("oras://"):
image_url = image_url.replace("oras://", "")

wave_api_url = "https://wave.seqera.io"
url = f"{wave_api_url}/v1alpha1/inspect"

# if platform_pat:
# data["toweraccesstoken"] = platform_pat
# else:
# TODO
logger.warning("'platform_pat' not set, no auth to wave back end")

try:
logger.info(f"calling image inspect at {url} for image url {image_url}")
response = httpx.post(
url=url,
json={"containerImage": image_url},
headers={"content-type": "application/json"},
)

data = response.json()
logger.debug(data)
layers = data.get("container", {}).get("manifest", {}).get("layers", [])
is_singularity = len(layers) == 1 and layers[0].get("mediaType", "").endswith(".sif")
if not is_singularity:
print(layers)
raise ValueError("not a singularity image")
if "digest" not in layers[0]:
print(layers)
raise ValueError("no 'digest' in first layer found")

digest = layers[0]["digest"].replace("sha256:", "")
container_url = f"https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/{digest[:2]}/{digest}/data"
print(container_url)

except httpx.RequestError as exc:
print(f"An error occurred while requesting {exc.request.url!r}.")
print("No singularity image for you")
2 changes: 1 addition & 1 deletion .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
token: ${{ secrets.nf_core_bot_auth_token }}

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
# FIXME Flip this off once we get to less than a couple hundred. Adding
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Install NodeJS
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
Expand All @@ -58,7 +58,7 @@ jobs:
editorconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
Expand All @@ -78,7 +78,7 @@ jobs:
modules: ${{ steps.tags.outputs.modules }}
subworkflows: ${{ steps.tags.outputs.subworkflows }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 2 # To retrieve the preceding commit.

Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
# Prod for version bumping

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -148,14 +148,14 @@ jobs:
"${{ fromJson(needs.nf-test-changes.outputs.modules) }}",
]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.11"

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
id: cache-pip
with:
path: ~/.cache/pip
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
"${{ fromJson(needs.nf-test-changes.outputs.subworkflows) }}",
]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
Expand Down Expand Up @@ -398,14 +398,14 @@ jobs:
NXF_ANSI_LOG: false

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.11"

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
id: cache-pip-pytest
with:
path: ~/.cache/pip
Expand Down Expand Up @@ -472,7 +472,7 @@ jobs:

- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4
with:
name: logs-${{ matrix.profile }}-${{ steps.parsed.outputs.result }}
path: |
Expand Down Expand Up @@ -653,7 +653,7 @@ jobs:
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4
with:
Expand Down Expand Up @@ -682,7 +682,7 @@ jobs:
with:
python-version: "3.11"

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
id: cache-pip-pdiff
with:
path: ~/.cache/pip
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
additional_dependencies:
- [email protected]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.3
hooks:
- id: check-jsonschema
# match meta.ymls in one of the subdirectories of modules/nf-core
Expand Down
9 changes: 5 additions & 4 deletions modules/nf-core/bamtofastq10x/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process BAMTOFASTQ10X {
tuple val(meta), path(bam)

output:
tuple val(meta), path("*.fastq.gz"), emit: fastq
path "versions.yml" , emit: versions
tuple val(meta), path("**/*.fastq.gz"), emit: fastq
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -24,7 +24,7 @@ process BAMTOFASTQ10X {
bamtofastq \\
$args \\
$bam \\
${prefix}.fastq.gz
$prefix
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -35,7 +35,8 @@ process BAMTOFASTQ10X {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.fastq.gz
mkdir -p ${prefix}/bamtofastq10x
touch ${prefix}/bamtofastq10x/bamtofastq.fastq.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/bamtofastq10x/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ output:
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.fastq.gz":
- "**/*.fastq.gz":
type: file
description: fastq compressed file
pattern: "*.fastq.gz"
pattern: "**/*.fastq.gz"
- versions:
- versions.yml:
type: file
Expand Down
22 changes: 9 additions & 13 deletions modules/nf-core/bamtofastq10x/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
"id": "test"
},
[
[
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0",
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f",
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002"
]
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0",
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f",
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002"
]
]
],
Expand All @@ -25,11 +23,9 @@
"id": "test"
},
[
[
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0",
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f",
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002"
]
"bamtofastq_S1_L000_I1_001.fastq.gz:md5,a33682ac881de7a7453d79721b7621a0",
"bamtofastq_S1_L000_R1_001.fastq.gz:md5,5ccebf77d8636d7a7cdfc59737aea79f",
"bamtofastq_S1_L000_R2_001.fastq.gz:md5,2ee7c90e4307deba74065cfd00a65002"
]
]
],
Expand All @@ -39,9 +35,9 @@
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.0"
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-05-22T16:43:24.999397"
"timestamp": "2024-10-02T12:56:21.808042"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/filter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process BCFTOOLS_FILTER {
'biocontainers/bcftools:1.20--h8b25389_0' }"

input:
tuple val(meta), path(vcf)
tuple val(meta), path(vcf), path(tbi)

output:
tuple val(meta), path("*.${extension}"), emit: vcf
Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/bcftools/filter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ input:
type: file
description: VCF input file
pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}"
- tbi:
type: file
description: VCF index file
pattern: "*.tbi"
output:
- vcf:
- meta:
Expand Down
Loading

0 comments on commit 0a2da6b

Please sign in to comment.