Error handling for PaDEL-Descriptor not returning any calculated values #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update includes handling for an error observed in issue #12, where some compounds would return no computed descriptors/fingerprints (temporary CSV not saving an entry for the compound).
For example, the compound "buprenorphine" with SMILES string "Oc7ccc5c1c7O[C@H]3[C@]6(OC)C@HC@@(C)C(C)(C)C" would produce an output CSV file with no entry for the compound when the following is executed:
When PaDELPy re-imports these descriptors to return to the user, an indexing error occurred due to the from_smiles function (and the from_mdl function, it has the same behavior) looking through an empty list.
This update ensures that the following exception is raised if this behavior occurs:
One of buprenorphine's alternate SMILES strings, "C[C@([C@H]1C[C@@]23CC[C@@]1([C@H]4[C@@]25CCN([C@@h]3CC6=C5C(=C(C=C6)O)O4)CC7CC7)OC)(C(C)(C)C)O", also produces this error. Another alternate SMILES string, "CC(C)(C)C(C)(C1CC23CCC1(C4C25CCN(C3CC6=C5C(=C(C=C6)O)O4)CC7CC7)OC)O", simply causes a timeout error (unable to calculate descriptors given 60 minutes of available runtime, as stated in the above issue).
The issue cited above states that the GUI version of PaDEL-Descriptor is also unable to calculate values for these SMILES, therefore I theorize that the underlying issue is likely within PaDEL-Descriptor.
This update also includes updated DocStrings.