Skip to content
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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#827](https://github.com/nf-core/mag/pull/827) - Updated to nf-core 3.3.2`TEMPLATE` (by @dialvarezs)
- [#841](https://github.com/nf-core/mag/pull/841) - MultiQC config updated to support CheckM, CheckM2, and GTDB-Tk (by @harper357)
- [#844](https://github.com/nf-core/mag/pull/843) - Change loading mechanism of internal PhiX/Lambda databases to improve Dev UX when schema building (by @jfy133)
- [#851](https://github.com/nf-core/mag/pull/851) - Improve structure of local modules and subworkflows (by @dialvarezs)
Comment thread
dialvarezs marked this conversation as resolved.

### `Fixed`

Expand All @@ -48,8 +49,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Deprecated`

[#799](https://github.comf/nf-core/mag/pull/799) - Removed `--cat_official_taxonomy` in favour of `--cat_allow_unofficial_lineages` to control CAT's use of unofficial lineages (added by @dialvarezs)
[#825](https://github.com/nf-core/mag/pull/825) - Removed `--centrifuge_db`, `--kraken2_db`, `--krona_db` and `--skip_krona` parameters following the removal of taxonomic profiling functionality. See nf-core/taxprofiler for replacement (added by @dialvarezs).
- [#799](https://github.comf/nf-core/mag/pull/799) - Removed `--cat_official_taxonomy` in favour of `--cat_allow_unofficial_lineages` to control CAT's use of unofficial lineages (added by @dialvarezs)
- [#825](https://github.com/nf-core/mag/pull/825) - Removed `--centrifuge_db`, `--kraken2_db`, `--krona_db` and `--skip_krona` parameters following the removal of taxonomic profiling functionality. See nf-core/taxprofiler for replacement (added by @dialvarezs)
- [#851](https://github.com/nf-core/mag/pull/851) - Remove `POOL_READ_*` local modules in favor of nf-core cat/fastq (by @dialvarezs)

## v4.0.0 - [2025-05-22]

Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"cat/fastq": {
"branch": "master",
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
},
"catpack/addnames": {
Expand Down
File renamed without changes.
File renamed without changes.
30 changes: 0 additions & 30 deletions modules/local/nanolyse.nf

This file was deleted.

26 changes: 0 additions & 26 deletions modules/local/pool_paired_reads.nf

This file was deleted.

25 changes: 0 additions & 25 deletions modules/local/pool_single_reads.nf

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
process SAMTOOLS_UNMAPPED {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "bioconda::samtools=1.21"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9e/9edc2564215d5cd137a8b25ca8a311600987186d406b092022444adf3c4447f7/data' :
'community.wave.seqera.io/library/htslib_samtools:1.21--6cb89bfd40cbaabf' }"
conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9e/9edc2564215d5cd137a8b25ca8a311600987186d406b092022444adf3c4447f7/data'
: 'community.wave.seqera.io/library/htslib_samtools:1.21--6cb89bfd40cbaabf'}"

input:
tuple val(meta), path(input), path(index)

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

when:
task.ext.when == null || task.ext.when
Expand All @@ -26,16 +26,16 @@ process SAMTOOLS_UNMAPPED {
"""
samtools \\
view \\
--threads ${task.cpus-1} \\
$args \\
$input \\
--threads ${task.cpus - 1} \\
${args} \\
${input} \\
| \\
samtools \\
fastq \\
$args2 \\
--threads ${task.cpus-1} \\
${args2} \\
--threads ${task.cpus - 1} \\
-0 ${prefix}.fastq.gz \\
$mapped
${mapped}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -44,7 +44,6 @@ process SAMTOOLS_UNMAPPED {
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.fastq.gz
Expand Down
File renamed without changes.
18 changes: 11 additions & 7 deletions modules/nf-core/cat/fastq/meta.yml

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

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
include { BCFTOOLS_CONSENSUS } from '../../modules/nf-core/bcftools/consensus/main'
include { BCFTOOLS_INDEX as BCFTOOLS_INDEX_PRE ; BCFTOOLS_INDEX as BCFTOOLS_INDEX_POST } from '../../modules/nf-core/bcftools/index/main'
include { BCFTOOLS_VIEW } from '../../modules/nf-core/bcftools/view/main'
include { FREEBAYES } from '../../modules/nf-core/freebayes/main'
include { PYDAMAGE_ANALYZE } from '../../modules/nf-core/pydamage/analyze/main'
include { PYDAMAGE_FILTER } from '../../modules/nf-core/pydamage/filter/main'
include { SAMTOOLS_FAIDX as FAIDX} from '../../modules/nf-core/samtools/faidx/main'
include { BCFTOOLS_CONSENSUS } from '../../../modules/nf-core/bcftools/consensus/main'
include { BCFTOOLS_INDEX as BCFTOOLS_INDEX_PRE ; BCFTOOLS_INDEX as BCFTOOLS_INDEX_POST } from '../../../modules/nf-core/bcftools/index/main'
include { BCFTOOLS_VIEW } from '../../../modules/nf-core/bcftools/view/main'
include { FREEBAYES } from '../../../modules/nf-core/freebayes/main'
include { PYDAMAGE_ANALYZE } from '../../../modules/nf-core/pydamage/analyze/main'
include { PYDAMAGE_FILTER } from '../../../modules/nf-core/pydamage/filter/main'
include { SAMTOOLS_FAIDX as FAIDX} from '../../../modules/nf-core/samtools/faidx/main'

workflow ANCIENT_DNA_ASSEMBLY_VALIDATION {
take:
input //channel: [val(meta), path(contigs), path(bam), path(bam_index)]
ch_input //channel: [val(meta), path(contigs), path(bam), path(bam_index)]
main:
ch_versions = Channel.empty()

PYDAMAGE_ANALYZE(
input.map {
ch_input.map {
meta, _contigs, bam, bai -> [
meta, bam[0], bai[0]
]
Expand All @@ -28,8 +28,8 @@ workflow ANCIENT_DNA_ASSEMBLY_VALIDATION {
}

if ( !params.skip_ancient_damagecorrection ) {
FAIDX(input.map { item -> [ item[0], item[1] ] }, [[],[]], false )
freebayes_input = input.join(FAIDX.out.fai) // [val(meta), path(contigs), path(bam), path(bam_index), path(fai)]
FAIDX(ch_input.map { item -> [ item[0], item[1] ] }, [[],[]], false )
freebayes_input = ch_input.join(FAIDX.out.fai) // [val(meta), path(contigs), path(bam), path(bam_index), path(fai)]
.multiMap{
meta, contigs, bam, bai, fai ->
reads: [ meta, bam, bai, [], [], [] ]
Expand All @@ -48,7 +48,7 @@ workflow ANCIENT_DNA_ASSEMBLY_VALIDATION {
BCFTOOLS_INDEX_POST(BCFTOOLS_VIEW.out.vcf)
BCFTOOLS_CONSENSUS(BCFTOOLS_VIEW.out.vcf
.join(BCFTOOLS_INDEX_POST.out.tbi)
.join(input.map { item -> [ item[0], item[1] ] }))
.join(ch_input.map { item -> [ item[0], item[1] ] }))

ch_corrected_contigs = BCFTOOLS_CONSENSUS.out.fasta

Expand All @@ -60,7 +60,7 @@ workflow ANCIENT_DNA_ASSEMBLY_VALIDATION {


emit:
contigs_recalled = ch_corrected_contigs // channel: [ val(meta), path(fasta) ]
contigs_recalled = ch_corrected_contigs // channel: [ val(meta), path(fasta) ]
pydamage_results = PYDAMAGE_ANALYZE.out.csv // channel: [ val(meta), path(csv) ]
pydamage_filtered_results = PYDAMAGE_FILTER.out.csv // channel: [ val(meta), path(csv) ]
versions = ch_versions // channel: [ versions.yml ]
Expand Down
80 changes: 80 additions & 0 deletions subworkflows/local/ancient_dna/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "ancient_dna_assembly_validation"
description: Ancient DNA analysis workflow for metagenomic samples
keywords:
- ancient DNA
- aDNA
- metagenomics
- authentication
- damage patterns
components:
- bcftools/consensus
- bcftools/view
- freebayes
- pydamage/analyze
- pydamage/filter
- samtools/faidx
input:
- ch_input:
description: Assembled contigs with alignment data
structure:
- meta:
type: map
description: Metadata map
- contigs:
type: file
description: Assembled contigs in FASTA format
pattern: "*.{fasta,fa}"
- bam:
type: file
description: BAM alignment files
pattern: "*.bam"
- bam_index:
type: file
description: BAM index files
pattern: "*.bai"
output:
- contigs_recalled:
description: Damage-corrected contigs
structure:
- meta:
type: map
description: Metadata map
- fasta:
type: file
description: Corrected contigs in FASTA format
pattern: "*.{fasta,fa}"
- pydamage_results:
description: PyDamage analysis results
structure:
- meta:
type: map
description: Metadata map
- csv:
type: file
description: Damage pattern analysis in CSV format
pattern: "*.csv"
- pydamage_filtered_results:
description: Filtered PyDamage results
structure:
- meta:
type: map
description: Metadata map
- csv:
type: file
description: Filtered damage pattern results in CSV format
pattern: "*.csv"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@maxibor"
- "@@alexhbnr"
- "@jfy133"
maintainers:
- "@jfy133"
- "@prototaxites"
- "@dialvarezs"
- "@d4straub"
- "@muabnezor"
Comment thread
dialvarezs marked this conversation as resolved.
Loading