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

Conversation

mauro-saporita
Copy link
Contributor

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

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Comment on lines -25 to -34
// 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

Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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 }
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

@lgrochowalski lgrochowalski self-requested a review March 20, 2024 13:08
maxulysse
maxulysse previously approved these changes Mar 20, 2024
@maxulysse maxulysse added this pull request to the merge queue Mar 20, 2024
@mauro-saporita mauro-saporita removed this pull request from the merge queue due to a manual request Mar 20, 2024
@mauro-saporita
Copy link
Contributor Author

@maxulysse let's hold a bit on this PR; tests are not working yet 😣

include { UNZIP as UNZIP_RT } from '../../../../modules/nf-core/unzip/main.nf'

workflow test_ascat {
input = [
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 also update the path as in #5281 ? :)

@famosab
Copy link
Contributor

famosab commented May 15, 2024

@mauro-saporita Do you still have time to work on the proposed changes?

@mauro-saporita
Copy link
Contributor Author

@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.

@famosab
Copy link
Contributor

famosab commented Jun 24, 2024

@mauro-saporita I added the loci and allele files for WGS (maybe we need some for WES as well?): nf-core/test-datasets#1239

Copy link
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

Maybe you can add these paths to the nf test code and then run the tests on your machine. If that works we can add the files to the test_data and update the paths.

Comment on lines +25 to +26
input[1] = []
input[2] = []
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')]

Comment on lines +57 to +58
input[1] = []
input[2] = []
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.

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')]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Status: No status
Development

Successfully merging this pull request may close these issues.

ascat
5 participants