qbicsoftware / variantstore-service

The Variantstore is a Java/Groovy-based service application implemented using the Micronaut framework and enables storage and access to information on genomic variants and metadata from a connected database via a RESTful API.
MIT License
4 stars 1 forks source link

Gene information upload by .gff3 fails if reference genome version in file name contains Ensembl version #42

Closed christopher-mohr closed 3 years ago

christopher-mohr commented 3 years ago

If the reference genome of the provided .gff3 file is contained in the file name, this information is parsed. If the file name additionally contains the Ensembl version such as GRCh38.87 in the provided test file Homo_sapiens.GRCh38.87.chromosome.Y.gff3 the upload process fails due to a GroovyCastException.

Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '87' with class 'java.lang.String' to class 'java.lang.Integer'
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToNumber(DefaultTypeTransformation.java:172)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:282)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:243)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:615)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at life.qbic.variantstore.parser.EnsemblParser.<init>(EnsemblParser.groovy:47)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:249)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at life.qbic.variantstore.controller.GeneController.storeGenes(GeneController.groovy:123)
Mar 22 17:22:13 oncostore-db-proto start_varianstore_jar.sh: at life.qbic.variantstore.controller.$GeneControllerDefinition$$exec3.invokeInternal(Unknown Source)

The minor version should be cased to Integer.

christopher-mohr commented 3 years ago

Fixed by #43.