nf-core / nf-core/modules

[FEATURE] nf-test assertions - use md5 sums for readLines

Open
#8,236 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

nf-test
Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

Is your feature request related to a problem? Please describe

Sometimes parts of output files have timestamps or similar stuff in them which makes the total md5sum of the file itself instable. Thus we usally go for asserting the lines with readLines() or even just the name.

Describe the solution you'd like

I suggest using

file.readLines()[2..-1].join('\n').md5()

to create md5sums for the stable parts. This makes the snapshots smaller :)

List of modules / sbwfs this can be applied to

Some of them might also benefit from nf-test plugins

  • hicap
  • toulligqc
  • plasmidfinder
  • bam_qc_picard
  • sistr
  • optitype
  • fastme
  • fastq_qc_trim_filter_setstrandedness
  • paraphase
  • bandage/image
  • interproscan
  • umitools/group
  • motus/profile
  • picard/markduplicates
  • bbmap/sendsketch
  • integronfinder
  • geoquery/getgeo
  • bcftools/stats
  • vcf2maf
  • seqsero2
  • issero
  • metaphlan/metaphlan
  • purecn/intervalfile
  • gappa/examineheattree
  • methyldackel/mbias
  • entrezdirect/esummary
  • muse/call
  • bowtie2/align
  • snippy/run
  • porechop/abi
  • controllfreec/freec2bed
  • nucmer
  • gstama/collapse
  • homer_groseq
  • scimap/mcmicro
  • picard/collecthsmetrics
  • qcat
  • mapdamage2
  • biobambam/bammarkduplicates2
  • kallistobustools/count
  • controlfreec/freec
  • fcsgx/rungx
  • picard/collectinsertsizemetrics
  • cafe
  • gatk4/mergemutectstats
  • iqtree

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the nf-test assertion and snapshot handling for readLines() and md5 values. Use the requested stable-line hash behavior as the completion criterion, then review the listed modules for applicable snapshot updates.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.