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

create ASCAT nf tests and remove pytest #5314

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
43 changes: 43 additions & 0 deletions modules/nf-core/ascat/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "ascat"

test("ascat") {
mauro-saporita marked this conversation as resolved.
Show resolved Hide resolved

config "./simple-nextflow.config"

when {
process {
"""
input[0] = [
[ id: 'test', single_end:false ],
[
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true)
]
]
input[1] = []
input[2] = []
famosab marked this conversation as resolved.
Show resolved Hide resolved
Comment on lines +25 to +26
Copy link
Contributor

@famosab famosab Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to test it out:

Suggested change
input[1] = []
input[2] = []
input[1] = [path('https://raw.githubusercontent.com/nf-core/test-datasets/d677699283dbbeb51876d1bb3c18fb687d1db4ea/data/genomics/homo_sapiens/illumina/ascat/G1000_alleles_WGS_hg38/G1000_alleles_hg38_chr21.txt')]
input[2] = [path('https://raw.githubusercontent.com/nf-core/test-datasets/d677699283dbbeb51876d1bb3c18fb687d1db4ea/data/genomics/homo_sapiens/illumina/ascat/G1000_loci_WGS_hg38/G1000_loci_hg38_chr21.txt')]

input[3] = []
input[4] = []
input[5] = []
input[6] = []
"""
}
}

then {
assertAll (
{ assert process.success }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a check for the version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added; but unfortunately the test doesn't work, I get the following error: Path value cannot be null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you ru the module manually do you get a versions file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the error when it runs { assert process.success } so it doesn't run the test at all - could be something wrong with the way I declare the inputs?

                input[1] = []
                input[2] = []
                input[3] = []
                input[4] = []
                input[5] = []
                input[6] = []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pytest runs with the following:

ASCAT_SIMPLE ( input , [], [], [], [], [], [])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path value cannot be null issue solved by @sateeshperi - but test still not working

)
}
}
famosab marked this conversation as resolved.
Show resolved Hide resolved
}
16 changes: 16 additions & 0 deletions modules/nf-core/ascat/tests/simple-nextflow.config
famosab marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }


withName: ASCAT {
ext.args = [
gender : 'XY',
genomeVersion : 'hg19',
minCounts : '1',
min_base_qual : '1',
min_map_qual : '1',
chrom_names : 'c("21","22")'
]
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/ascat/tests/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ascat:
- modules/nf-core/ascat/**
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ artic/guppyplex:
artic/minion:
- modules/nf-core/artic/minion/**
- tests/modules/nf-core/artic/minion/**
ascat:
famosab marked this conversation as resolved.
Show resolved Hide resolved
- modules/nf-core/ascat/**
- tests/modules/nf-core/ascat/**
ashlar:
- modules/nf-core/ashlar/**
- tests/modules/nf-core/ashlar/**
Expand Down
114 changes: 0 additions & 114 deletions tests/modules/nf-core/ascat/main.nf

This file was deleted.

40 changes: 0 additions & 40 deletions tests/modules/nf-core/ascat/nextflow.config

This file was deleted.

113 changes: 0 additions & 113 deletions tests/modules/nf-core/ascat/test.yml

This file was deleted.

Loading