nf-core / raredisease

Call and score variants from WGS/WES of rare disease patients.
https://nf-co.re/raredisease
MIT License
85 stars 34 forks source link

Empty VCF file fails in genmod score #613

Closed fa2k closed 1 month ago

fa2k commented 1 month ago

Description of the bug

This is arguably a problem with genmod and there is a bug report https://github.com/Clinical-Genomics/genmod/issues/130, but I hope you don't mind that I report it here.

If the input VCF file to genmod score is empty, the process crashes. I get this problem with the structural variants file in NFCORE_RAREDISEASE:RAREDISEASE:RANK_VARIANTS_SV:GENMOD_SCORE.

We can close the bug if it gets fixed in genmod, or maybe there's a way to prevent it from running genmod if there are no variants.

Command used and terminal output

Sep-20 05:29:14.503 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_RAREDISEASE:RAREDISEASE:RANK_VARIANTS_SV:GENMOD_SCORE (NA12878)'

Caused by:
  Process `NFCORE_RAREDISEASE:RAREDISEASE:RANK_VARIANTS_SV:GENMOD_SCORE (NA12878)` terminated with an error exit status (1)

Command executed:

  genmod \
      score \
      --rank_results \
      --family_file NA12878.ped \
      --score_config rank_model_sv.ini \
      --outfile NA12878_sv_genmod_score_research_score.vcf \
      NA12878_sv_genmod_models_research_models.vcf

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_RAREDISEASE:RAREDISEASE:RANK_VARIANTS_SV:GENMOD_SCORE":
      genmod: $(echo $(genmod --version 2>&1) | sed 's/^.*genmod version: //' )
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  [2024-09-20 05:29:14,289] WARNING : genmod.score_variants.check_plugins: INFO field GeneticModels is not in vcf INFO. This field will not be scored.
  [2024-09-20 05:29:14,289] WARNING : genmod.score_variants.check_plugins: INFO field ModelScore is not in vcf INFO. This field will not be scored.
  [2024-09-20 05:29:14,290] ERROR   : genmod.commands.score_variants: All score plugins has to be defined in vcf header
  Aborted!

Work dir:
  /data0/paalmbj/na12878_med_pipeline/work/36/7394ba6d2c4ec84f7a5884525e1517

Relevant files

NA12878_sv_genmod_models_research_models.vcf.txt

(renamed to txt to allow upload)

System information

nextflow: 24.03.0-edge Pipeline version: dev fb77d3f84bb6b0d1440635fc268f03a696f2d45e

fa2k commented 1 month ago

Maybe there will never be zero SVs in real genome data. I have an error with svdb that caused the empty file in my case. I will close this one as I think it's not really a problem, and instead report an issue about svdb / gnomAD.