Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/actions/nf-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,40 @@ runs:
conda-solver: libmamba
conda-remove-defaults: true

- name: Check if disk cleanup is needed
id: disk-cleanup-check
shell: bash
env:
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
run: |
nf-test test \
--profile=+${{ inputs.profile }} \
$(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
--ci \
--changed-since HEAD^ \
--verbose \
--shard ${{ inputs.shard }}/${{ inputs.total_shards }} \
--dry-run \
&> nf-test.log

if grep -q 'full - stub' nf-test.log; then
echo "cleanup=YES" >> $GITHUB_OUTPUT
else
echo "cleanup=NO" >> $GITHUB_OUTPUT
fi

- name: Disk space cleanup
if: steps.disk-cleanup-check.outputs.cleanup == 'YES'
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false

- name: Run nf-test
shell: bash
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
# PRs to the nf-core repo main/master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
# PRs to the nf-core repo main/master branch are only ok if coming from the nf-core repo `dev` or any `patch` or `fix` branches
- name: Check PRs
if: github.repository == 'Plant-Food-Research-Open/assemblyqc'
run: |
{ [[ ${{ github.event.pull_request.head.repo.full_name }} == Plant-Food-Research-Open/assemblyqc ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{ github.event.pull_request.head.repo.full_name }} == Plant-Food-Research-Open/assemblyqc ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ "${GITHUB_HEAD_REF%%/*}" == "patch" ]] || [[ "${GITHUB_HEAD_REF%%/*}" == "fix" ]]

# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@52423e01640425a022ef5fd42c6fb5f633a02728 # v2
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
Expand Down
2 changes: 1 addition & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ template:
- igenomes
- multiqc
- fastqc
version: 3.0.0
version: 3.0.1
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
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).

## v3.0.1 - [14-Oct-2025]

### `Added`

1. Added disk cleanup to nf-test GitHub CI action to avoid the runner running out of disk space for `full - stub` runs
2. Added hic.bam file speedup by skipping name sort.

### `Fixed`

1. Fixed an issue in Synteny workflow which caused a pipeline crash when Syri failed for one of the synteny combinations [#315](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/315)
2. Fixed an issue which cause parameter validation to fail for `hic_map_combinations` when `hic` parameter was set to `null` [#317](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/317)

### `Dependencies`

1. Nextflow!>=24.10.5
2. nf-schema@2.4.2

## v3.0.0 - [22-Sep-2025]

### `Added`
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors:
- family-names: "Deng"
given-names: "Cecilia"
title: "AssemblyQC: A Nextflow pipeline for reproducible reporting of assembly quality"
version: 3.0.0
version: 3.0.1
date-released: 2024-07-30
url: "https://github.com/Plant-Food-Research-Open/assemblyqc"
doi: 10.1093/bioinformatics/btae477
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ process {
withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:BWA_MEM' {
ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" }
ext.args = '-5SP'
ext.args2 = '-n'
// ext.args2 = '-n'
}

withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:SAMBLASTER' {
Expand Down
2 changes: 1 addition & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Kraken 2 [assigns taxonomic labels](https://ccb.jhu.edu/software/kraken2/) to se
- `*_1_fastqc.html/*_2_fastqc.html`: FastQC html report for the reads passed by FASTP.
- `*_1_fastqc.zip/*_2_fastqc.zip`: FastQC stats for the reads passed by FASTP.
- `hicqc`
- `*_qc_report.pdf`: HiC QC report for reads mapped to an assembly.
- `*_qc_report.pdf`: HiC QC report for 5% of the HiC reads mapped to an assembly.
- `*.hic`: The HiC contact map stored as a multi-resolution `.hic` file.
- `*.assembly`: Assembly file created when the `hic_assembly_mode` is `true`
- `*.bed`: The bed file listing the names of the contigs on the `assembly` super-scaffold when `hic_assembly_mode` is `true`
Expand Down
48 changes: 48 additions & 0 deletions modules/local/samtools_subsample_sort.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
process SAMTOOLS_SUBSAMPLE_SORT {
tag "$meta.id"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
'biocontainers/samtools:1.21--h50ea8bc_0' }"

input:
tuple val(meta), path(bam)
val(sample_fraction) // Fraction of reads to sample (e.g., 0.05 for 5%)

output:
tuple val(meta), path("*.subsampled.sorted.bam"), emit: bam
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def fraction = sample_fraction ?: 0.05

"""
# Subsample reads and sort by name in one go
# Format for -s is SEED.FRACTION (e.g., 42.05 for 5% with seed 42)
samtools view -@ ${task.cpus} -s ${fraction} -b ${bam} \\
| samtools sort -n -@ ${task.cpus} ${args} -o ${prefix}.subsampled.sorted.bam -

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.subsampled.sorted.bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ manifest {
mainScript = 'main.nf'
defaultBranch = 'main'
nextflowVersion = '!>=24.10.5'
version = '3.0.0'
version = '3.0.1'
doi = 'https://doi.org/10.1093/bioinformatics/btae477'
}

Expand Down
Loading
Loading