InformaticsMatters / pipelines-utils-rdkit

Utilities for RDKit-based pipelines
Apache License 2.0
0 stars 0 forks source link

Empty smiles string causes errors #1

Closed tdudgeon closed 5 years ago

tdudgeon commented 5 years ago

When parsing a data that has no value (empty string) for the smiles the rdkit molecule parsing blows up. Would probably also happen for mol format. The faulty code is here: https://github.com/InformaticsMatters/pipelines-utils-rdkit/blob/master/src/python/pipelines_utils_rdkit/rdkit_utils.py#L287-L289

In case of the empty string None should be returned as the molecule.

alanbchristie commented 5 years ago

Better handling of both my_type and txt committed to master branch. If either is None or empty then None is returned.