Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nf-test for FASTQ_ALIGN_HISAT2 #4887

Merged
merged 15 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
113 changes: 113 additions & 0 deletions subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
// nf-core subworkflows test fastq_align_hisat2
maxulysse marked this conversation as resolved.
Show resolved Hide resolved
nextflow_workflow {

name "Test Subworkflow FASTQ_ALIGN_HISAT2"
script "../main.nf"
workflow "FASTQ_ALIGN_HISAT2"
config "./nextflow.config"

tag "subworkflows"
tag "subworkflows_nfcore"
tag "subworkflows/fastq_align_hisat2"

tag "hisat2/align"
tag "hisat2/build"
tag "hisat2/extractsplicesites"

tag "samtools/flagstat"
tag "samtools/idxstats"
tag "samtools/index"
tag "samtools/sort"
tag "samtools/stats"

maxulysse marked this conversation as resolved.
Show resolved Hide resolved

setup {
run("HISAT2_EXTRACTSPLICESITES") {
script "../../../../modules/nf-core/hisat2/extractsplicesites/main.nf"
process {
"""
input[0] = Channel.of([
[id: 'test'],
file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true)
])
"""
}
}
run("HISAT2_BUILD") {
script "../../../../modules/nf-core/hisat2/build/main.nf"
process {
"""
input[0] = Channel.of([
[id: 'test'],
file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
])
input[1] = Channel.of([
[id: 'test'],
file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true)
])
input[2] = HISAT2_EXTRACTSPLICESITES.out.txt
"""
}
}
}

test("sarscov2 - bam - single_end") {

when {
workflow {
"""
input[0] = Channel.of([
[ id:'test', single_end:true ],
[
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true)
]
])
input[1] = HISAT2_BUILD.out.index
input[2] = HISAT2_EXTRACTSPLICESITES.out.txt
input[3] = Channel.of([
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
])
"""
}
}

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

test("sarscov2 - bam - paired_end") {

when {
workflow {
"""
input[0] = Channel.of([
[ id:'test', single_end:false ],
[
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true)
]
])
input[1] = HISAT2_BUILD.out.index
input[2] = HISAT2_EXTRACTSPLICESITES.out.txt
input[3] = Channel.of([
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
])
"""
}
}

then {
assertAll(
{ assert workflow.success},
{ assert snapshot(workflow.out).match()}
)
}
}
}
Loading
Loading