Answers.Body: <p>Had the same issue, but found that I need to provide a filename to use the csvstats option</p>
  
  <pre><code>snpEff -Xmx4g -csvStats stats.csv -v hg19 08_FILTER/NA12878.Filtered.Variants.vcf &gt; test.ann.vcf
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-29T21:14:21.040Z
Answers.LastActivityDate: 2019-11-29T21:14:21.040Z
Answers.UserDisplayName: lonestar21
Body: <p>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?</p>
  
  <pre><code>snpEff -Xmx4g -csvStats -v hg19 08_FILTER/NA12878.Filtered.Variants.vcf &gt; 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.&lt;init&gt;(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.&lt;init&gt;(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 &gt; 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
  </code></pre>
  
  <p>Here is the snpEff.config file. I installed the snpEff at /miniconda2/share
  .</p>
  
  <pre><code># 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
  #-------------------------------------------------------------------------------
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-30T14:34:48.360Z
Comments.Text: 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. :(
Comments.UserDisplayName: Daniel Standage
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-30T15:41:25.003Z
Comments.Text: @DanielStandage I've got the one more issue with the installation, I thought it might be something with snpEff installed in miniconda2, so I deleted the snpEff and re-installed it in the prior directory of it, I realized it's not a good idea so I removed the snpEff again and installed the snpEff at /share/miniconda2 again. And now I'm getting error snpEff: command not found, how can I make this working?
Comments.UserDisplayName: kwoo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-30T16:02:25.280Z
Comments.Text: @DanielStandage I mean, how can I make just 'snpEff' code working without java jar? It worked before I re-installed it but now I think something is twisted. I don't have an idea cause    snpEff -Xmx4g -v hg19 08_FILTER/${sample}.Filtered.Variants.vcf > 09_ANN/${sample}.ann.vcf 
     worked without -csvStats option well.
Comments.UserDisplayName: kwoo
Tags: <variation><gatk><snpeff>
Title: How to use -csvStats option?
ThreadText: # How to use -csvStats option?
  
  (Asked by: username_0 on 2019-07-29)
  
  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
  #-------------------------------------------------------------------------------
  
  ```
  
  **Tags:** variation, gatk, snpeff
  
  > **Comments:**
  > **username_1**: 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. :(  
  > **username_0**: @username_1 I've got the one more issue with the installation, I thought it might be something with snpEff installed in miniconda2, so I deleted the snpEff and re-installed it in the prior directory of it, I realized it's not a good idea so I removed the snpEff again and installed the snpEff at /share/miniconda2 again. And now I'm getting error snpEff: command not found, how can I make this working?  
  > **username_0**: @username_1 I mean, how can I make just 'snpEff' code working without java jar? It worked before I re-installed it but now I think something is twisted. I don't have an idea cause    snpEff -Xmx4g -v hg19 08_FILTER/${sample}.Filtered.Variants.vcf > 09_ANN/${sample}.ann.vcf     worked without -csvStats option well.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-11-29. Score: 0
  
  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
  
  ```
  
  
  ---
  
  