Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e275fe2
tested and linted disambiguate module
ctuni Mar 16, 2026
7ea603c
Merge branch 'master' into disambiguate
ctuni Mar 16, 2026
a4f0798
topic migration crispresso2 (#10827)
gmarenne Mar 16, 2026
92b5ffd
add missing channels for workflow outputs (#10918)
atrigila Mar 16, 2026
1af66d2
Hisat build springcleaning (#10686)
srisarya Mar 16, 2026
3806bda
Abyss (#10647)
LiaOb21 Mar 16, 2026
ca8234d
Migrate gfaffix version topics (#10905)
EfraMP Mar 16, 2026
9015d4b
stageAs FASTQC input files to avoid basename file collisions (#10924)
tgelafr-pfzr Mar 16, 2026
10f88b8
update module: duphold (#10822)
camlloyd Mar 16, 2026
23a8f0f
updated macs3 to 3.0.4 and added topic channel (#10926)
Kevin-Brockers Mar 17, 2026
9da7349
Add ViralConsensus module (#9655)
lucaspatel Mar 17, 2026
d1d62d3
fix(purge_dups): re-add prefix to output file names (#10919)
prototaxites Mar 17, 2026
f71199b
Add module for vcfexpress (#10409)
sofiademmou Mar 17, 2026
b0910f0
feat(tximeta/tximport): add tag directive (#10927)
pinin4fjords Mar 17, 2026
47f72f7
Add new module: saltshaker/classify (#10914)
ieduba Mar 17, 2026
8af92b6
feat: add topic version emission to quant-related modules (#10931)
pinin4fjords Mar 17, 2026
8cd6ee6
removed redundant assertions
ctuni Mar 17, 2026
4671631
Merge branch 'master' into disambiguate
ctuni Mar 17, 2026
f3daa73
Merge branch 'master' into disambiguate
ctuni Mar 18, 2026
e4add7d
Update modules/nf-core/disambiguate/tests/main.nf.test
ctuni Mar 19, 2026
3b1043f
Update modules/nf-core/disambiguate/tests/main.nf.test
ctuni Mar 19, 2026
251079a
Update modules/nf-core/disambiguate/main.nf
ctuni Mar 19, 2026
3b6db58
fixed meta.yml and test snap
ctuni Mar 19, 2026
c1e6fb6
Merge branch 'master' into disambiguate
ctuni Mar 19, 2026
be0e413
Merge branch 'master' into disambiguate
ctuni Mar 20, 2026
e4e2ae6
added ontology format for the txt output
ctuni Mar 30, 2026
ebf4093
Merge branch 'master' into disambiguate
ctuni Mar 30, 2026
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
7 changes: 7 additions & 0 deletions modules/nf-core/disambiguate/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ngs-disambiguate=2018.05.03"
45 changes: 45 additions & 0 deletions modules/nf-core/disambiguate/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process DISAMBIGUATE {
tag "$meta.id"
label 'process_low'

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

input:
tuple val(meta), path(bam_a), path(bam_b)

output:
tuple val(meta), path("*disambiguatedSpeciesA.bam"), emit: disambiguated_bam_a
tuple val(meta), path("*disambiguatedSpeciesB.bam"), emit: disambiguated_bam_b
tuple val(meta), path("*ambiguousSpeciesA.bam"), emit: ambiguous_bam_a
tuple val(meta), path("*ambiguousSpeciesB.bam"), emit: ambiguous_bam_b
tuple val(meta), path("*_summary.txt"), emit: summary
tuple val("${task.process}"), val('ngs-disambiguate'), val('2018.05.03'), topic: versions, emit: versions_ngs_disambiguate

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
ngs_disambiguate \\
${bam_a} \\
${bam_b} \\
$args \\
-s ${prefix} \\
-o .
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.disambiguatedSpeciesA.bam
touch ${prefix}.disambiguatedSpeciesB.bam
touch ${prefix}.ambiguousSpeciesA.bam
touch ${prefix}.ambiguousSpeciesB.bam
touch ${prefix}_summary.txt
"""
}
134 changes: 134 additions & 0 deletions modules/nf-core/disambiguate/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: "disambiguate"
description: |
Disambiguates reads aligned to two different organisms (e.g. human and mouse)
from the same source of FASTQ files. Useful in explant RNA/DNA-Seq workflows
where reads from two species are present. For reads aligned to both organisms,
the algorithm compares alignment quality scores to determine the most likely
species of origin. Produces four BAM files (uniquely assigned to species A or B,
ambiguous for species A or B) and a summary file.
keywords:
- disambiguation
- xenograft
- explant
- rna-seq
- alignment
- bam
tools:
- "ngs-disambiguate":
description: "Disambiguation algorithm for reads aligned to two different organisms\
\ using Tophat, Hisat2, BWA or STAR alignments."
homepage: "https://github.com/AstraZeneca-NGS/disambiguate"
documentation: "https://github.com/AstraZeneca-NGS/disambiguate"
tool_dev_url: "https://github.com/AstraZeneca-NGS/disambiguate"
doi: "10.12688/f1000research.10082.2"
licence:
- "MIT"
identifier: biotools:disambiguate
args_id: "$args"
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- bam_a:
type: file
description: BAM file with alignments to species A (e.g. human). Mandatory.
pattern: "*.{bam}"
ontologies:
- edam: "http://edamontology.org/format_2572"
- bam_b:
type: file
description: BAM file with alignments to species B (e.g. mouse). Mandatory.
pattern: "*.{bam}"
ontologies:
- edam: "http://edamontology.org/format_2572"
output:
disambiguated_bam_a:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*disambiguatedSpeciesA.bam":
type: file
description: Reads uniquely assigned to species A.
pattern: "*disambiguatedSpeciesA.bam"
ontologies:
- edam: "http://edamontology.org/format_2572"
disambiguated_bam_b:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*disambiguatedSpeciesB.bam":
type: file
description: Reads uniquely assigned to species B.
pattern: "*disambiguatedSpeciesB.bam"
ontologies:
- edam: "http://edamontology.org/format_2572"
ambiguous_bam_a:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*ambiguousSpeciesA.bam":
type: file
description: Reads aligned to species A that also aligned to species B but
could not be uniquely assigned.
pattern: "*ambiguousSpeciesA.bam"
ontologies:
- edam: "http://edamontology.org/format_2572"
ambiguous_bam_b:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*ambiguousSpeciesB.bam":
type: file
description: Reads aligned to species B that also aligned to species A but
could not be uniquely assigned.
pattern: "*ambiguousSpeciesB.bam"
ontologies:
- edam: "http://edamontology.org/format_2572"
summary:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*_summary.txt":
type: file
description: Summary of read counts uniquely assigned to species A, species
B, and ambiguous reads.
pattern: "*_summary.txt"
ontologies:
- edam: "http://edamontology.org/format_2330"
versions_ngs_disambiguate:
- - ${task.process}:
type: string
description: The name of the process
- ngs-disambiguate:
type: string
description: The name of the tool
- 2018.05.03:
type: string
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- ngs-disambiguate:
type: string
description: The name of the tool
- 2018.05.03:
type: string
description: The expression to obtain the version of the tool
authors:
- "@ctuni"
maintainers:
- "@ctuni"
59 changes: 59 additions & 0 deletions modules/nf-core/disambiguate/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
nextflow_process {

name "Test Process DISAMBIGUATE"
script "../main.nf"
process "DISAMBIGUATE"

tag "modules"
tag "modules_nfcore"
tag "disambiguate"

test("homo_sapiens - pipistrellus_nathusii - bam") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/eukaryotes/Pipistrellus_nathusii/genome/test.bam', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

}

test("homo_sapiens - pipistrellus_nathusii - bam - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/eukaryotes/Pipistrellus_nathusii/genome/test.bam', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

}

}
118 changes: 118 additions & 0 deletions modules/nf-core/disambiguate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"homo_sapiens - pipistrellus_nathusii - bam": {
"content": [
{
"ambiguous_bam_a": [
[
{
"id": "test"
},
"test.ambiguousSpeciesA.bam:md5,ebd81596ea7369e28f79326972b20af4"
]
],
"ambiguous_bam_b": [
[
{
"id": "test"
},
"test.ambiguousSpeciesB.bam:md5,4ba9631d1fbfe3308b5d36eddb76dbe1"
]
],
"disambiguated_bam_a": [
[
{
"id": "test"
},
"test.disambiguatedSpeciesA.bam:md5,15105f572c62cdfcc5c4c58d3e1f072c"
]
],
"disambiguated_bam_b": [
[
{
"id": "test"
},
"test.disambiguatedSpeciesB.bam:md5,27d054e54e112840da5f9a9de874e652"
]
],
"summary": [
[
{
"id": "test"
},
"test_summary.txt:md5,f3a14c362e13c08e1e87cabb2e0b2b78"
]
],
"versions_ngs_disambiguate": [
[
"DISAMBIGUATE",
"ngs-disambiguate",
"2018.05.03"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2026-03-19T10:27:04.503780051"
},
"homo_sapiens - pipistrellus_nathusii - bam - stub": {
"content": [
{
"ambiguous_bam_a": [
[
{
"id": "test"
},
"test.ambiguousSpeciesA.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"ambiguous_bam_b": [
[
{
"id": "test"
},
"test.ambiguousSpeciesB.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"disambiguated_bam_a": [
[
{
"id": "test"
},
"test.disambiguatedSpeciesA.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"disambiguated_bam_b": [
[
{
"id": "test"
},
"test.disambiguatedSpeciesB.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"summary": [
[
{
"id": "test"
},
"test_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_ngs_disambiguate": [
[
"DISAMBIGUATE",
"ngs-disambiguate",
"2018.05.03"
]
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2026-03-19T10:27:22.859032297"
}
}
Loading