Discussion Forum

Syntax error on scientific notation

Hi everyone,

I have an issue on migrating datatype double on a relation attribute :

match $protein_expressed_in isa protein, has uniprot_id “O60809”; $expressed_in_ae isa anatomical_entity, has anatomical_name “multi-cellular organism”; insert $expressed_in(protein_expressed_in: $protein_expressed_in, expressed_in_ae: $expressed_in_ae) isa expressed_in; $expressed_in has expression_rank 1.9801980198019803e-05; $expressed_in has expression_quality ‘silver quality’;

mismatched input ‘e-05’ expecting {‘match’, ‘define’, ‘undefine’, ‘insert’, ‘compute’}. Please check server logs for the stack trace."

I am migrating with python. The line is :

"$expressed_in has expression_rank " + str(anatomical_expression[“expression_rank”]) + "; "

So how should I deal with a scientific notation on python float numbers while migrating?

Thanks

Hi - we don’t support exponential/scientific notation for doubles at this time :slight_smile: To work around this limitation, I would look into using python’s string formatting to write explicit decimals.

For instance, see: https://stackoverflow.com/questions/25099626/convert-scientific-notation-to-float

Hope that helps!