luispedro / waldo

Waldo Project
MIT License
2 stars 3 forks source link

MGI type conversion errors with "pubmedid" #50

Closed magsol closed 14 years ago

magsol commented 14 years ago

When inserting all MGI data into a relational database, the following warnings came up:

/usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'name' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Incorrect integer value: 'UniProtKB' for column 'pubmedid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Incorrect integer value: 'MGI' for column 'pubmedid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Incorrect integer value: 'HGNC' for column 'pubmedid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Incorrect integer value: 'Reactome' for column 'pubmedid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Incorrect integer value: 'BHF-UCL' for column 'pubmedid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'output_name' at row 1 cursor.execute(statement, parameters)

The truncated data columns can be fixed later, but the values that are being parsed for the pubmedids here seem to be wrong. Not sure if this is a parsing error (perhaps a missing whitespace character, or one too many?), but it should be investigated rather than simply making the pubmedid field a String instead of an Integer.

magsol commented 14 years ago

Errors for LOCATE: /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'goid' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'title' at row 1 cursor.execute(statement, parameters) /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'author' at row 1 cursor.execute(statement, parameters)

Errors for eSLDB: /usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py:123: Warning: Data truncated for column 'value' at row 1 cursor.execute(statement, parameters)

All simple data truncation warnings. It's possible we can ignore them.

luispedro commented 14 years ago

This is bc mysql is more strict than sqlite in types. I sort of like that mysql is flagging our errors.

This should be fixed, though.

magsol commented 14 years ago

This was a consequence of MGI's "pubmedid" not actually storing the pubmed ID, but rather the source database name. This has been fixed for MGI, but the LOCATE and eSLDB errors are likely still there.