I'm trying to get CSV files from snpEff -csvStats option and got stuck. I tried the code below and only got the vcf file with no contents. How can I use -csvStats option properly?

snpEff -Xmx4g -csvStats -v hg19 08_FILTER/NA12878.Filtered.Variants.vcf > test.ann.vcf

    00:00:00  SnpEff version SnpEff 4.3t (build 2017-11-24 10:18), by Pablo Cingolani
    00:00:00  Command: 'ann'
    00:00:00  Reading configuration file 'snpEff.config'. Genome: '08_FILTER/NA12878.Filtered.Variants.vcf'
    00:00:00  Reading config file: /home/ubuntu/01_NA12878/snpEff.config
    00:00:00  Reading config file: /home/ubuntu/miniconda2/share/snpeff-4.3.1t-2/snpEff.config
    java.lang.RuntimeException: Property: '08_FILTER/NA12878.Filtered.Variants.vcf.genome' not found
      at org.snpeff.interval.Genome.<init>(Genome.java:106)
      at org.snpeff.snpEffect.Config.readGenomeConfig(Config.java:681)
      at org.snpeff.snpEffect.Config.readConfig(Config.java:649)
      at org.snpeff.snpEffect.Config.init(Config.java:480)
      at org.snpeff.snpEffect.Config.<init>(Config.java:117)
      at org.snpeff.SnpEff.loadConfig(SnpEff.java:451)
      at org.snpeff.snpEffect.commandLine.SnpEffCmdEff.run(SnpEffCmdEff.java:1000)
      at org.snpeff.snpEffect.commandLine.SnpEffCmdEff.run(SnpEffCmdEff.java:984)
      at org.snpeff.SnpEff.run(SnpEff.java:1183)
      at org.snpeff.SnpEff.main(SnpEff.java:162)
    00:00:00  Logging

00:00:01  Done.

 snpEff -Xmx4g -v hg19 -csvStats 08_FILTER/NA12878.Filtered.Variants.vcf > tes2.ann.vcf

00:00:25  Genome stats :
# Genome name                : 'Homo_sapiens (USCS)'
# Genome version             : 'hg19'
# Genome ID                  : 'hg19[0]'
#     'M' 16571   Vertebrate_Mitochondrial
#     'Un_gl000226'   15008   Standard
#     '18_gl000207_random'    4262    Standard
#     'MT'    1   Vertebrate_Mitochondrial

00:00:27  Predicting variants

Here is the snpEff.config file. I installed the snpEff at /miniconda2/share .

# Databases are stored here
# E.g.: Information for 'hg19' is stored in data.dir/hg19/
# You can use tilde ('~') as first character to refer to your home directory. 
# Also, a non-absolute path will be relative to config's file dir
data.dir = ./data/

# Database repository: A URL to the server where you can download databases (command: 'snpEff download dbName')
database.repository = http://downloads.sourceforge.net/project/snpeff/databases

# Latest version numbers. Check here if there is an update.
versions.url = http://snpeff.sourceforge.net/versions.txt

# Third party databases

# Databases for human GRCh38 (hg38)

database.clinvar.GRCh38                 = ./db/GRCh38/clinvar/clinvar-latest.vcf.gz
database.repository.clinvar             = ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/clinvar-latest.vcf.gz

database.dbsnp.GRCh38                   = ./db/GRCh38/dbSnp/dbSnp.vcf.gz
database.repository.dbsnp.GRCH38        = ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/00-All.vcf.gz

database.dbnsfp.GRCH38                  = ./db/GRCh38/dbNSFP/dbNSFP.txt.gz

# Databases for human GRCh37 (hg19)
database.clinvar.GRCh37                 = ./db/GRCh37/clinvar/clinvar-latest.vcf.gz
database.repository.clinvar.GRCh37      = ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh37/clinvar-latest.vcf.gz

database.dbsnp.GRCh37                   = ./db/GRCh37/dbSnp/
database.repository.dbsnp.GRCh37        = ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b141_GRCh37p13/VCF/

database.gwascatalog.GRCh37             = ./db/GRCh37/gwasCatalog/gwascatalog.txt
database.repository.gwascatalog.GRCh37  = http://www.genome.gov/admin/gwascatalog.txt

database.dbnsfp.GRCh37                  = ./db/GRCh37/dbNSFP/dbNSFP.txt.gz

# Loss of function (LOF) 

# It is assumed that even with a protein coding change at the 
# last 5% of the protein, the protein could still be functional.
lof.ignoreProteinCodingAfter  : 0.95

#  It is assumed that even with a protein coding change at the 
#  first 5% of the protein: 
#       "..suggesting some disrupted transcripts are 
#       rescued by transcriptional reinitiation at an 
#       alternative start codon."
lof.ignoreProteinCodingBefore : 0.05

# Larger deletions removing either the first exon or more than 
# 50% of the protein-coding sequence of the affected transcript
lof.deleteProteinCodingBases : 0.50

# Codon tables
# Format:   It's a comma separated "codon/aminoAcid[+*]" list 
#           Where 'codon' is in uppper case, aminoAcid is a one letter 
#           code, '+' denotes start codon and '*' denotes stop codon.
# References:   http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi
#               ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt
  • 1
    $\begingroup$ Welcome to Bioinformatics.SE! Could you provide the contents of your snpEff.config file? It looks like the VCF file is being treated as a genome rather than a variant file (it took the VCF filename, added .genome to the end, and then says "Property not found"). Caveat: I'm not a snpEff user, I'm just looking at the manual. $\endgroup$ – Daniel Standage Jul 29 '19 at 19:43
  • 1
    $\begingroup$ @RamRS, please note that we don't have any official policy discouraging cross-posting. There are differing opinions among the moderators, but until the issue is resolved there is nothing wrong with a post like this. $\endgroup$ – Daniel Standage Jul 29 '19 at 20:22
  • $\begingroup$ @DanielStandage Understood. Part of the reason was to provide a cross-link, I'll remove the instruction part of my comment. $\endgroup$ – Ram RS Jul 30 '19 at 13:27
  • $\begingroup$ @DanielStandage Thank you for your reply. I updated the post whit the snpEff.config file. Can you have a look? $\endgroup$ – kwoo Jul 30 '19 at 14:27
  • $\begingroup$ Hmmmm. The message Genome: '08_FILTER/NA12878.Filtered.Variants.vcf' is confusing me. That's not in this snpEff.config file. Is it in the other config file? The terminal output includes /home/ubuntu/01_NA12878/snpEff.config and /home/ubuntu/miniconda2/share/snpeff-4.3.1t-2/snpEff.config. If the VCF file isn't in either config file, my next guess would be that the command-line arguments are declared incorrectly. I don't know enough about snpEff to troubleshoot that without more context, though. :( $\endgroup$ – Daniel Standage Jul 30 '19 at 14:34

Had the same issue, but found that I need to provide a filename to use the csvstats option

snpEff -Xmx4g -csvStats stats.csv -v hg19 08_FILTER/NA12878.Filtered.Variants.vcf > test.ann.vcf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.