Question: snpEFF Database building error
0
gravatar for Parimala Devi
6.7 years ago by
Finland/Tampere/Genevia Technologies
Parimala Devi70 wrote:

I am using snpEFF for SNP annotation. I am building my own database. I added genome entry to snpEff's configuration. I'm building the database from a GFF file.

When I wrote out this command :

java -jar snpEff.jar build -gff -v Y55

I got this error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: ca/mcgill/mcb/pcingola/snpEffect/commandLine/SnpEff : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: ca.mcgill.mcb.pcingola.snpEffect.commandLine.SnpEff. Program will exit.


How do I fix this?

Thanks in advance! :)

 

snp software error • 6.1k views
ADD COMMENTlink modified 3.5 years ago by bioinfo8120 • written 6.7 years ago by Parimala Devi70
3
gravatar for Devon Ryan
6.7 years ago by
Devon Ryan98k
Freiburg, Germany
Devon Ryan98k wrote:

Have a look at this thread on stackoverflow. In short, using a more recent version of java will probably fix this issue.

ADD COMMENTlink modified 6.7 years ago • written 6.7 years ago by Devon Ryan98k

Thank you! I upgraded to a newer version of Java.

ADD REPLYlink written 6.7 years ago by Parimala Devi70

Now, I'm facing the following error.

Command:

java -Xmx2g /home/bioratcliff/SPRING-2014/Softwares/snpEff/snpEff.jar -c /home/bioratcliff/SPRING-2014/Softwares/snpEff/snpEff.config saccharomyces_cerevisiae -v LR1_sorted_snp.vcf > LR1_snpEFF.vcf

Error: Could not find or load main class .home.bioratcliff.SPRING-2014.Softwares.snpEff.snpEff.jar

ADD REPLYlink written 6.7 years ago by Parimala Devi70
2

You forgot the "-jar" option:

java -Xmx4g -jar snpEff.jar ...

ADD REPLYlink written 6.7 years ago by Pablo1.9k

My bad!
Thank you!!

ADD REPLYlink written 6.7 years ago by Parimala Devi70

I can't believe I overlooked that in my earlier comment!

ADD REPLYlink written 6.7 years ago by Devon Ryan98k

It would seem that you need to set the class path.

ADD REPLYlink written 6.7 years ago by Devon Ryan98k

I am also trying to build my database as the version I need is unavailable in snpEff.

edited snpEff.config:

# org genome, version org.7
org.7.genome : species
org.7.M.codonTable : Vertebrate_Mitochondrial

build database

>java -Xmx4g -jar snpEff.jar build -gtf22 -v org.7
00:00:00        SnpEff version SnpEff 4.3p (build 2017-06-06 09:55), by Pablo Cingolani
00:00:00        Command: 'build'
00:00:00        Building database for 'org.7'
00:00:00        Reading configuration file 'snpEff.config'. Genome: 'org.7'
00:00:00        Reading config file: C:\cygwin64\home\me\bin\snpEff\snpEff.config
00:00:00        done
Reading GTF22 data file  : 'C:\Users\me/bin/snpEff/data/org.7/genes.gtf'
java.lang.RuntimeException: File not found 'C:\Users\me/bin/snpEff/data/org.7/genes.gtf'
        at org.snpeff.util.Gpr.reader(Gpr.java:531)
        at org.snpeff.util.Gpr.reader(Gpr.java:504)
        at org.snpeff.snpEffect.factory.SnpEffPredictorFactoryGff.readGff(SnpEffPredictorFactoryGff.java:486)
        at org.snpeff.snpEffect.factory.SnpEffPredictorFactoryGff.create(SnpEffPredictorFactoryGff.java:337)
        at org.snpeff.snpEffect.commandLine.SnpEffCmdBuild.createSnpEffPredictor(SnpEffCmdBuild.java:118)
        at org.snpeff.snpEffect.commandLine.SnpEffCmdBuild.run(SnpEffCmdBuild.java:362)
        at org.snpeff.SnpEff.run(SnpEff.java:1183)
        at org.snpeff.SnpEff.main(SnpEff.java:162)
java.lang.RuntimeException: Error reading file 'C:\Users\me/bin/snpEff/data/org.7/genes.gtf'
java.lang.RuntimeException: File not found 'C:\Users\me/bin/snpEff/data/org.7/genes.gtf'
        at org.snpeff.snpEffect.factory.SnpEffPredictorFactoryGff.create(SnpEffPredictorFactoryGff.java:353)
        at org.snpeff.snpEffect.commandLine.SnpEffCmdBuild.createSnpEffPredictor(SnpEffCmdBuild.java:118)
        at org.snpeff.snpEffect.commandLine.SnpEffCmdBuild.run(SnpEffCmdBuild.java:362)
        at org.snpeff.SnpEff.run(SnpEff.java:1183)
        at org.snpeff.SnpEff.main(SnpEff.java:162)
00:00:00        Logging
00:00:01        Checking for updates...
00:00:02        Done.

I know there is no file called gene.gtf under ~/data/org.7/ but its ~/data/org.7/species.org.7.gtf/species.org.7.gtf . I have no idea why its pointing there and not on the real one.

Please guide. Thanks.

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by bioinfo8120

As mentioned here Building Snpeff Database, I even renamed my file to genes.gtf, but still same error.

I think its because I am using cygwin.

ADD REPLYlink written 3.5 years ago by bioinfo8120
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2285 users visited in the last hour
_