-
Notifications
You must be signed in to change notification settings - Fork 644
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
base: master
Are you sure you want to change the base?
Conversation
// extended tests running with 1000 genomes data. Data is downloaded as follows: | ||
// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00154/alignment/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam | ||
// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00154/alignment/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai | ||
// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam | ||
// wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai | ||
// wget https://www.dropbox.com/s/l3m0yvyca86lpwb/G1000_loci_hg19.zip | ||
// wget https://www.dropbox.com/s/3fzvir3uqe3073d/G1000_alleles_hg19.zip | ||
// wget https://www.dropbox.com/s/v0tgr1esyoh1krw/GC_G1000_hg19.zip | ||
// wget https://www.dropbox.com/s/50n7xb06x318tgl/RT_G1000_hg19.zip | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could keep this info somewhere for local testing on input file changes. maybe we can add a readme here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I'm going to save it in a readme; where do you suggest I should save it? In modules/nf-core/ascat/tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a good palce
|
||
then { | ||
assertAll ( | ||
{ assert process.success } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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] = []
There was a problem hiding this comment.
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 , [], [], [], [], [], [])
There was a problem hiding this comment.
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
@maxulysse let's hold a bit on this PR; tests are not working yet 😣 |
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) | ||
] | ||
input[1] = file(params.test_data['homo_sapiens']['illumina']['test2_allele_specific_recal'], checkIfExists: true) | ||
input[2] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check if path(loci_files)
is optional aswell? I know we discussed that on slack but maybe that is why the nf-test does not run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be optional but for some reason pytest works without loci and allele files. I'm trying to figure out why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also would like to run nf-test using loci_files
and allele_files
but they are not in test_data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be optional but for some reason pytest works without loci and allele files. I'm trying to figure out why.
Got it now, pytest only executed stub test: nextflow run ./tests/modules/nf-core/ascat -entry test_ascat -c ./tests/config/nextflow.config -stub-run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: I just say that you said there are none so we need to add them via PR.
(Ok then we'll need to search for alternatives for those files here here or if there are none add them.)
{ assert snapshot(process.out.versions).match("versions") } | ||
) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to add the stub test here aswell. You can just copy the normal test and add stub to the name as well as a line saying options "-stub"
@@ -43,9 +43,6 @@ artic/guppyplex: | |||
artic/minion: | |||
- modules/nf-core/artic/minion/** | |||
- tests/modules/nf-core/artic/minion/** | |||
ascat: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone know why the CI pytest is triggered despite removal from the config by the CI nf-test is not triggered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only pytest-changes is triggered (not sure if it should run or not); pytest doesn't run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes my bad! But nf-test should be triggered but is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be because snapshot is not available yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then the linting should fail first and that is also not triggered. Can you run nf-test locally?
nf-core modules test ascat --profile docker
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then the linting should fail first and that is also not triggered. Can you run nf-test locally?
nf-core modules test ascat --profile docker
?
I run the test locally but it fails because loci_files
and allele_files
are missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@famosab could you help me to identify the right loci_files
and allele_files
for testing?
Can we use the files used in Sarek?
https://github.com/nf-core/sarek/blob/6aeac929c924ba382baa42a0fe969b4e0e753ca9/conf/igenomes.config#L15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should work when they work with sarek - I would go for the latest reference genome: https://github.com/nf-core/sarek/blob/6aeac929c924ba382baa42a0fe969b4e0e753ca9/conf/igenomes.config#L46
Somewhere in the sarek conf it also says that you can setup the reference for ascat yourself and there are some intermediate steps to take but I guess they already did those for igenomes. I think we just have to make sure that the test_data input is also hg38 if we use human data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
include { UNZIP as UNZIP_RT } from '../../../../modules/nf-core/unzip/main.nf' | ||
|
||
workflow test_ascat { | ||
input = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the path as in #5281 ? :)
@mauro-saporita Do you still have time to work on the proposed changes? |
I'm sorry lately I've been off the radar; busy with some other projects. I can work on this issue in June unless someone else would like to take it in the next week Hackathon event. |
PR checklist
Closes #5170
nf-test not working - pytest runs as expected but the nf-test I've created returns the following error:
Path value cannot be null
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda