AnnotationPathException: struct has no field input

I am attempting to annotate with VEP and am getting the following error:

>>> temp = hl.vep(mt, "vep85-dbNSFP4-ruddle.json")
JObject(List((name,JString(VEP)), (config,JString(vep85-dbNSFP4-ruddle.json)), (csq,JBool(false)), (blockSize,JInt(1000))))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<decorator-gen-1573>", line 2, in vep
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/typecheck/check.py", line 614, in wrapper
    return __original_func(*args_, **kwargs_)
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/methods/qc.py", line 605, in vep
    'blockSize': block_size})).persist()
  File "<decorator-gen-1085>", line 2, in persist
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/typecheck/check.py", line 614, in wrapper
    return __original_func(*args_, **kwargs_)
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/table.py", line 1836, in persist
    return Env.backend().persist_table(self, storage_level)
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/backend/spark_backend.py", line 315, in persist_table
    return Table._from_java(self._jbackend.pyPersistTable(storage_level, self._to_java_table_ir(t._tir)))
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/py4j/java_gateway.py", line 1257, in __call__
    answer, self.gateway_client, self.target_id, self.name)
  File "/gpfs/ycga/project/kahle/sk2847/conda_envs/hail/lib/python3.7/site-packages/hail/backend/spark_backend.py", line 41, in deco
    'Error summary: %s' % (deepest, full, hail.__version__, deepest)) from None
hail.utils.java.FatalError: AnnotationPathException: struct has no field input

Java stack trace:
is.hail.annotations.AnnotationPathException: struct has no field input
	at is.hail.types.virtual.TStruct.queryTyped(TStruct.scala:107)
	at is.hail.types.virtual.Type.query(Type.scala:137)
	at is.hail.types.virtual.Type.query(Type.scala:134)
	at is.hail.methods.VEP.execute(VEP.scala:145)
	at is.hail.expr.ir.TableToTableApply.execute(TableIR.scala:2409)
	at is.hail.expr.ir.Interpret$.apply(Interpret.scala:23)
	at is.hail.backend.spark.SparkBackend$$anonfun$pyPersistTable$1.apply(SparkBackend.scala:403)
	at is.hail.backend.spark.SparkBackend$$anonfun$pyPersistTable$1.apply(SparkBackend.scala:402)
	at is.hail.expr.ir.ExecuteContext$$anonfun$scoped$1.apply(ExecuteContext.scala:20)
	at is.hail.expr.ir.ExecuteContext$$anonfun$scoped$1.apply(ExecuteContext.scala:18)
	at is.hail.utils.package$.using(package.scala:602)
	at is.hail.annotations.Region$.scoped(Region.scala:18)
	at is.hail.expr.ir.ExecuteContext$.scoped(ExecuteContext.scala:18)
	at is.hail.backend.spark.SparkBackend.withExecuteContext(SparkBackend.scala:230)
	at is.hail.backend.spark.SparkBackend.pyPersistTable(SparkBackend.scala:402)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.GatewayConnection.run(GatewayConnection.java:238)
	at java.lang.Thread.run(Thread.java:748)



Hail version: 0.2.49-11ae8408bad0
Error summary: AnnotationPathException: struct has no field input

Any help would be appreciated

1 Like

I am facing the same error now.

This is my updated vep schema

"vep_json_schema": "Struct{colocated_variants:Array[Struct{clin_sig:Array[String],frequencies: Dict[String,Struct{gnomad_nfe: Float64,gnomad: Float64,gnomad_eas: Float64,gnomad_afr: Float64,gnomad_oth: Float64,gnomad_asj: Float64,gnomad_amr: Float64,gnomad_sas: Float64}]}],most_severe_consequence: String,transcript_consequences: Array[Struct{consequence_terms: Array[String], exon: String, gene_id: String, hgvsc: String, hgvsp: String,  impact: String, lof: String, lof_flags: String, lof_filter: String, lof_info: String}],variant_class: String}"
}

Solution:
Turns out there is a field called input: str in vep json schema which can’t be removed.
Putting it back into the vep json schema solved the problem.