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

Module stub that touch .gz break snapshots in nf-test #5409

Open
3 of 74 tasks
awgymer opened this issue Mar 28, 2024 · 2 comments
Open
3 of 74 tasks

Module stub that touch .gz break snapshots in nf-test #5409

awgymer opened this issue Mar 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@awgymer
Copy link
Contributor

awgymer commented Mar 28, 2024

Have you checked the docs?

Description of the bug

Per this slack thread it seems that empty .gz files generated by simply touch <filename>.gz break the snapshot functionality of nf-test by causing an EOFException because the files are not actually compressed.

Per this comment a fix is to replace the touch command with echo "" | gzip > <filename>.gz.

A git grep -cP "touch .*\.gz(\s+.*)*$" identifies the following 71 modules as using this pattern:

  • arriba/download
  • art/illumina
  • bcftools/call
  • bcftools/concat
  • bedgovcf
  • bowtie2/align
  • cadd
  • cat/fastq
  • cellrangerarc/mkfastq
  • cellrangeratac/mkfastq
  • deepvariant
  • delly/call
  • ensemblvep/vep
  • expansionhunter
  • fcs/fcsadaptor
  • gatk4/applyvqsr
  • gatk4/filtermutectcalls
  • gatk4/genotypegvcfs
  • gatk4/haplotypecaller
  • gatk4/mergevcfs
  • gatk4/mutect2
  • gatk4/postprocessgermlinecnvcalls
  • gatk4/reblockgvcf
  • gatk4/samtofastq
  • gatk4/selectvariants
  • gatk4/variantfiltration
  • genomad/endtoend
  • getorganelle/fromreads
  • gfastats
  • gfatools/gfa2fa
  • glimpse/concordance
  • glimpse2/concordance
  • happy/happy
  • icountmini/peaks
  • icountmini/sigxls
  • jasminesv
  • kmcp/search
  • lofreq/somatic
  • mosdepth
  • nanofilt
  • ngmerge
  • parabricks/mutectcaller
  • paragraph/multigrmpy
  • paragraph/vcf2paragraph
  • pharokka/installdatabases
  • picard/liftovervcf
  • picard/renamesampleinvcf
  • picard/sortvcf
  • popscle/dscpileup
  • prodigal
  • pyrodigal
  • rtgtools/vcfeval
  • sentieon/applyvarcal
  • sentieon/dnamodelapply
  • sentieon/dnascope
  • sentieon/gvcftyper
  • sentieon/haplotyper
  • sentieon/tnfilter
  • sentieon/tnhaplotyper2
  • sentieon/tnscope
  • seqkit/grep
  • shapeit5/switch
  • sortmerna
  • star/align
  • stranger
  • svaba
  • svanalyzer/svbenchmark
  • svdb/merge
  • truvari/bench
  • vcflib/vcfbreakmulti
  • vt/decompose
  • vt/normalize
@awgymer awgymer added the bug Something isn't working label Mar 28, 2024
@famosab
Copy link
Contributor

famosab commented Apr 11, 2024

For wittyer the code in the stub test actually looks like this:

    touch ${prefix}.json
    echo "" | gzip > ${prefix}.vcf.gz
    touch ${prefix}.vcf.gz.tbi

When I tested the module using touch to create the .gz.tbi file did not lead to errors when asserting { assert snapshot(process.out).match() }, so it seems to me that you would only need to search for modules where the file extension ends with .gz.

@awgymer
Copy link
Contributor Author

awgymer commented Apr 11, 2024

The list was generated before I had tested .gz.* type files. It does indeed seem that these are not an issue for nf-test (I think it does a naive check for .gz file extension before it tries opening as a gzipped file?).

I've revised the list with a regex that excludes such files.

@tstoeriko tstoeriko mentioned this issue Apr 26, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants