Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust iload.molecules() in case of NoSuchAtomTypeException #8

Closed
sneumann opened this issue Feb 22, 2012 · 3 comments
Closed

Comments

@sneumann
Copy link
Member

Hi,

another problem occurs for other exceptions:

Error in .jcall(.jnew("org/openscience/cdk/ChemObject"), "Lorg/openscience/cdk/interfaces/IChemObjectBuilder;", :
org.openscience.cdk.exception.NoSuchAtomTypeException: The AtomType Se.2 could not be found

Can these be caught with rJava ? And an option added to iload.molecules()
to just jump over them, because we can't do anything with them anyway ?

Yours,
Steffen

@rajarshi
Copy link
Collaborator

I think there was an issue with catching Java exzceptions in R - I have to
revisit that. Can you send an example file to test on?

On Wed, Feb 22, 2012 at 10:38 AM, sneumann <
reply@reply.github.com

wrote:

Hi,

another problem occurs for other exceptions:

Error in .jcall(.jnew("org/openscience/cdk/ChemObject"),
"Lorg/openscience/cdk/interfaces/IChemObjectBuilder;", :
org.openscience.cdk.exception.NoSuchAtomTypeException: The AtomType Se.2
could not be found

Can these be caught with rJava ? And an option added to iload.molecules()
to just jump over them, because we can't do anything with them anyway ?

Yours,
Steffen


Reply to this email directly or view it on GitHub:
#8

Rajarshi Guha
NIH Chemical Genomics Center

@sneumann
Copy link
Member Author

Actually, with

## iterate over a large file
moliter <- iload.molecules(chebifile, type="sdf",
                           aromaticity = FALSE, typing = FALSE, skip=TRUE)

the problem is not anymore in the iteration through the file,
but I get them further down in my script when trying to obtain the fingerprint.

chebifp[i] <- get.fingerprint(mol, type = "standard") ## Exception with Se.2

I am using
ftp://ftp.ebi.ac.uk/pub/databases/chebi/SDF/ChEBI_complete.sdf.gz
(unzipped first, of course)

Yours, Steffen

@rajarshi
Copy link
Collaborator

The latest version in github fixes this (if you want to see exceptions set verbose=TRUE in the call to get.fingerprint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants