This is a test version of Biostars. For the public version, visit https://www.biostars.org.
using snpEff with custom genome

Hi, I'm trying to annotate variant calling with snpEff, using a reference genome (which I sequenced myself). I also have bed file with genes position corresponding with my reference genome.

I there a way to do so? I've tried to build database:

java -Xmx4g -jar snpEff.jar build -gtf22 -v q.fa

but got an error:

java.lang.RuntimeException: Property: 'q.fa.genome' not found

can snpEff accept a custom genome, or it must be from a public database?

also, is snpEff the proper tool for my need? any other suggestions? (organism is bacteria)

thanks a bunch

snp annotation snpeff

Have you tried to use

-noGenome                    : Do not load any genomic database (e.g. annotate using custom files).

snpEff is the correct tool but almost certainly you are not using correct command line options. For example I don't see the following in your first command to build the database :

build                        : Build a SnpEff database.

1 answer

In the end I found my answer here:

http://snpeff.sourceforge.net/SnpEff_manual.html#buildAddConfig

steps are:

  1. convert my bed file into gtf :

    bedToGenePred file.bed stdout | genePredToGtf file stdin output2.gtf

  2. make genome directory and place gtf + fasta files inside:

    mkdir data

    mkdir data/tiny37.61/

    cp q.fa data/tiny37.61/tiny37.61.fa # my fasta file.

    cp output2.gtf /data/tiny37.61/genes.gtf

  3. create config file with corresponding name:

    more snpEffect.config:

    out:

            # Tiny genome, version mm37.61
            tiny37.61.genome : Tiny
    
  4. build database with this config file + corresponding name:

java -Xmx4g -jar snpEff.jar build -c snpEffect.config -noGenome -gtf22 -v tiny37.61

  1. run snpEff with this config file + corresponding name:

java -Xmx4g -jar snpEff.jar ann -interval file.bed -v tiny37.61 -noGenome out2/freebayes_ordered.vcf -c snpEffect.config > snpeff.vcf

Log in to answer this question.