This is a test version of Biostars. For the public version, visit https://www.biostars.org.
snpEff custom database not found

Hi,

I'm using the buildDbNcbi.sh script from snpEff to build a custom database providing a NCBI accession number. It ran with no errors and after finishing the final entry in my snpEff.config corresponds to the genome.

NC_001348.1.genome : NC_001348.1

A relevant data folder has also been made (snpeff-5.2-1/data/NC_001348.1), and within this folder are 3 files

-rw-r--r-- 1 root root 284731 Aug  7 15:57 genes.gbk
-rw-r--r-- 1 root root  35170 Aug  7 15:57 sequence.bin
-rw-r--r-- 1 root root  41876 Aug  7 15:57 snpEffectPredictor.bin

However when I then run

java -jar /opt/conda/pkgs/snpeff-5.2-hdfd78af_1/share/snpeff-5.2-1/snpEff.jar -c snpEff.config -v -o vcf NC_001348.1 sample.vcf > sample.annotated.vcf

I get this error:

  00:00:00 SnpEff version SnpEff 5.2 (build 2023-09-29 06:17), by Pablo Cingolani
  00:00:00 Reading configuration file 'snpEff.config'. Genome: 'NC_001348.1'
  00:00:00 Reading config file: snpEff.config
  00:00:00 Reading config file: /opt/conda/pkgs/snpeff-5.2-hdfd78af_1/share/snpeff-5.2-1/snpEff.config
  java.lang.RuntimeException: Property: 'NC_001348.1.genome' not found

I'm running it within docker, so I'm not sure if this is causing any issues preventing it from locating the correct genome database files. It looks like all the files are there so i'm not sure if I'm missing a step after building the database. Would appreciate any ideas, thank you!

docker snpeff

this sounds like the paths don't quite work out relative to the config file,

the tool is quite finicky and does not quite inform where it is looking and what file it is trying to open. Try running with the -v ( verbose mode)

also you may need to set the -dataDir parameter as well

1 answer

Provide an absolute path for both -c and -dataDir, as suggested by @ialbert.

If that doesn't work, go to /opt/conda/pkgs/snpeff-5.2-hdfd78af_1/share/snpeff-5.2-1/ and then run ./scripts/buildDbNcbi.sh NC_001348.1 to update the config file it came with.

This solved it, thank you!

Log in to answer this question.