Closed pnrobinson closed 10 months ago
I was able to get a phenopacket for nemaline myopathy in Python, but the retinol blastoma is having errors. @pnrobinson @ielis
Can you post the code and the errors?
The code is pushed, here is the error I get when I try to parse the retinol blastoma json:
ParseError: Failed to parse interpretations field: Failed to parse diagnosis field: Failed to parse genomicInterpretations field: Failed to parse variationDescriptor field: Failed to parse extensions field: Failed to parse value field: repeated field value must be in [] which is 40.0%.......
The error seems to be coming from this:
'extensions': [{'name': 'mosaicism', 'value': '40.0%'}]
@ielis @iimpulse any idea what this might be?
I suspect this may be due to lag between the latest Python phenopacket-schema code and Java code. The retinoblastoma message was generated using phenopacket-schema v2.0.2
. However, we only have v2.0.0
for Python.
For the most part, the difference between v2.0.2
and v2.0.0
are Java-specific; we added module-info.java
to v2.0.2
, to make the library modular in the Java 9+ world. However, there is one commit that also affects .proto
file, and, therefore, can lead to message incompatibility: the commit f7195093
from May 11, 2022 where Jules fixed an incorrect use of protobuf's Any
field.
This may lead to error when parsing a message created by Java v2.0.2
using Python v2.0.0
.
This can likely be fixed by deploying v2.0.2
to PyPi.
This issue has been resolved, so I believe this task is done. I have been able to get many different phenopackets in python with no error.
@pnrobinson
See https://pypi.org/project/phenopackets
Use this tool to extract list of HPO terms from phenopacket