Skip to content

Commit

Permalink
Merge branch 'master' into samtools_quater
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse authored Feb 12, 2024
2 parents f815cea + c87b436 commit adc87d3
Show file tree
Hide file tree
Showing 12 changed files with 531 additions and 253 deletions.
90 changes: 45 additions & 45 deletions modules/nf-core/samtools/ampliconclip/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,94 +9,94 @@ nextflow_process {
tag "samtools"
tag "samtools/ampliconclip"

test("sarscov2 - bam, bed, false, false") {
test("sarscov2 - bam, bed") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
input[1] = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
input[2] = false
input[3] = false
save_cliprejects = false
save_clipstats = false
input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true))
input[2] = save_cliprejects
input[3] = save_clipstats
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
process.out.stats,
process.out.rejects_bam,
process.out.versions
).match() }
{ assert snapshot(file(process.out.bam[0][1]).name).match("bam_bed_name") },
{ assert snapshot(process.out.stats).match("bam_bed_stats") },
{ assert snapshot(process.out.rejects_bam).match("bam_bed_rejects_bam") },
{ assert snapshot(process.out.versions).match("bam_bed_versions") }
)
}

}


test("sarscov2 - bam, bed, true, false") {
test("sarscov2 - bam, bed, save_cliprejects") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
input[1] = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
input[2] = true
input[3] = false
save_cliprejects = true
save_clipstats = false
input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true))
input[2] = save_cliprejects
input[3] = save_clipstats
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
process.out.stats,
file(process.out.rejects_bam[0][1]).name,
process.out.versions
).match() }
{ assert snapshot(file(process.out.bam[0][1]).name).match("bam_bed_save_clipsats_name") },
{ assert snapshot(process.out.stats).match("bam_bed_save_clipsats_stats") },
{ assert snapshot(process.out.rejects_bam).match("bam_bed_save_clipsats_rejects_bam") },
{ assert snapshot(process.out.versions).match("bam_bed_save_clipsats_versions") }
)
}

}

test("sarscov2 - bam, bed, true, true") {
test("sarscov2 - bam, bed, save_cliprejects, save_clipstats") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ],
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
input[1] = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
input[2] = true
input[3] = true
save_cliprejects = true
save_clipstats = true
input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
input[1] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true))
input[2] = save_cliprejects
input[3] = save_clipstats
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
process.out.stats,
file(process.out.rejects_bam[0][1]).name,
process.out.versions
).match() }
{ assert snapshot(file(process.out.bam[0][1]).name).match("bam_bed_save_all_name") },
{ assert snapshot(process.out.stats).match("bam_bed_save_all_stats") },
{ assert snapshot(process.out.rejects_bam).match("bam_bed_save_all_rejects_bam") },
{ assert snapshot(process.out.versions).match("bam_bed_save_all_versions") }
)
}

}
}
151 changes: 130 additions & 21 deletions modules/nf-core/samtools/ampliconclip/tests/main.nf.test.snap

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

Loading

0 comments on commit adc87d3

Please sign in to comment.