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
2 changes: 1 addition & 1 deletion modules/nf-core/bowtie2/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ process BOWTIE2_ALIGN {
input:
tuple val(meta) , path(reads)
tuple val(meta2), path(index)
tuple val(meta3), path(fasta), path(fai)
tuple val(meta3), path(fasta)
val save_unaligned
val sort_bam

Expand Down
6 changes: 0 additions & 6 deletions modules/nf-core/bowtie2/align/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ input:
pattern: "*.{fa,fasta,fna}"
ontologies:
- edam: "http://edamontology.org/format_1929"
- fai:
type: file
description: Reference genome FASTA index file
pattern: "*.{fai}"
ontologies:
- edam: "http://edamontology.org/format_3326"
- save_unaligned:
type: boolean
description: |
Expand Down
78 changes: 26 additions & 52 deletions modules/nf-core/bowtie2/align/tests/main.nf.test

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/nf-core/bowtie2/build/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process BOWTIE2_BUILD {
'community.wave.seqera.io/library/bowtie2_htslib_samtools_pigz:edeb13799090a2a6' }"

input:
tuple val(meta), path(fasta), path(fai)
tuple val(meta), path(fasta)

output:
tuple val(meta), path('bowtie2') , emit: index
Expand Down
6 changes: 0 additions & 6 deletions modules/nf-core/bowtie2/build/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ input:
pattern: "*.{fa,fasta,fna}"
ontologies:
- edam: "http://edamontology.org/format_1929"
- fai:
type: file
description: Reference genome FASTA index file
pattern: "*.{fai}"
ontologies:
- edam: "http://edamontology.org/format_3326"
output:
index:
- - meta:
Expand Down
3 changes: 1 addition & 2 deletions modules/nf-core/bowtie2/build/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
Expand Down
6 changes: 2 additions & 4 deletions modules/nf-core/fastqscreen/buildfromindex/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ nextflow_process {
"""
input[0] = channel.of([
[id: "sarscov2"],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
], [
[id: "human"],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down
6 changes: 2 additions & 4 deletions modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ nextflow_process {
"""
input[0] = channel.of([
[id: "sarscov2"],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
], [
[id: "human"],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down
3 changes: 1 addition & 2 deletions modules/nf-core/hostile/clean/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
Expand Down
24 changes: 8 additions & 16 deletions modules/nf-core/vamb/bin/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
"""
}
Expand All @@ -51,8 +50,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
input[3] = false
input[4] = true
Expand Down Expand Up @@ -140,8 +138,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
"""
}
Expand All @@ -164,8 +161,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
input[3] = false
input[4] = true
Expand Down Expand Up @@ -230,8 +226,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
"""
}
Expand All @@ -254,8 +249,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
input[3] = false
input[4] = true
Expand Down Expand Up @@ -348,8 +342,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
"""
}
Expand All @@ -372,8 +365,7 @@ nextflow_process {
file(
"https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/mag/assemblies/SPAdes-test_minigut_contigs.fasta.gz",
checkIfExists: true
),
[]
)
]
input[3] = false
input[4] = true
Expand Down
10 changes: 1 addition & 9 deletions subworkflows/nf-core/fasta_index_dna/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,7 @@ workflow FASTA_INDEX_DNA {

// Handle different aligners using conditional logic
if (val_aligner == 'bowtie2') {

/*
This is a temporary fix until all aligner handle ch_fasta_fai
*/
ch_fasta_fai = ch_fasta.map { meta, fasta ->
tuple(meta, fasta, [])
}

BOWTIE2_BUILD(ch_fasta_fai)
BOWTIE2_BUILD(ch_fasta)
ch_aligner_index = BOWTIE2_BUILD.out.index
} else if (val_aligner == 'bwamem') {
BWAMEM1_INDEX(ch_fasta)
Expand Down
6 changes: 5 additions & 1 deletion subworkflows/nf-core/fastq_align_bowtie2/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ workflow FASTQ_ALIGN_BOWTIE2 {

main:

//
// Remap ch_fasta_fai to ch_fasta
ch_fasta = ch_fasta_fai.map{ meta, fasta, _fai -> [ meta, fasta] }

//
// Map reads with Bowtie2
//
BOWTIE2_ALIGN(ch_reads, ch_index, ch_fasta_fai, save_unaligned, sort_bam)
BOWTIE2_ALIGN(ch_reads, ch_index, ch_fasta, save_unaligned, sort_bam)

//
// Sort, index BAM file and run samtools stats, flagstat and idxstats
Expand Down
12 changes: 4 additions & 8 deletions subworkflows/nf-core/fastq_align_bowtie2/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down Expand Up @@ -70,8 +69,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down Expand Up @@ -126,8 +124,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down Expand Up @@ -178,8 +175,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down
9 changes: 1 addition & 8 deletions subworkflows/nf-core/fastq_align_dna/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ workflow FASTQ_ALIGN_DNA {
// Align fastq files to reference genome and (optionally) sort
if (aligner == 'bowtie2') {

/*
This is a temporary fix until all aligner handle ch_fasta_fai
*/
ch_fasta_fai = ch_fasta.map { meta, fasta ->
tuple(meta, fasta, [])
}

BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta_fai, false, sort)
BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta, false, sort)
// if aligner is bowtie2
ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam)
}
Expand Down
6 changes: 2 additions & 4 deletions subworkflows/nf-core/fastq_align_dna/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down Expand Up @@ -72,8 +71,7 @@ nextflow_workflow {
"""
input[0] = Channel.value([
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
])
"""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ nextflow_workflow {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
Expand Down Expand Up @@ -67,8 +66,7 @@ nextflow_workflow {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ nextflow_workflow {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/nf-core/fastq_remove_rrna/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ workflow FASTQ_REMOVE_RRNA {
SEQKIT_REPLACE_U2T.out.fastx
.map { _meta, fasta_file -> fasta_file }
.collectFile(name: 'rrna_combined_dna.fasta', newLine: true)
.map { fasta_file -> [[id: 'rrna_refs'], fasta_file, []] }
.map { fasta_file -> [[id: 'rrna_refs'], fasta_file] }
.set { ch_combined_fasta }

BOWTIE2_BUILD(
Expand All @@ -161,7 +161,7 @@ workflow FASTQ_REMOVE_RRNA {
BOWTIE2_ALIGN(
ch_reads_for_bowtie2.single_end,
ch_bowtie2_index,
[[], [], []], // No reference fasta needed
[[], []], // No reference fasta needed
true, // save_unaligned - for single-end this works correctly
false, // sort_bam - not needed
)
Expand All @@ -175,7 +175,7 @@ workflow FASTQ_REMOVE_RRNA {
BOWTIE2_ALIGN_PE(
ch_reads_for_bowtie2.paired_end,
ch_bowtie2_index,
[[], [], []], // No reference fasta needed for BAM output
[[], []], // No reference fasta needed for BAM output
false, // save_unaligned - we'll extract from BAM instead
false, // sort_bam - not needed
)
Expand Down
Loading