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

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

Comments

Projects
None yet
2 participants
Contributor

sneumann commented Feb 22, 2012

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

Owner

rajarshi commented Feb 22, 2012

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

Contributor

sneumann commented Feb 22, 2012

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

Owner

rajarshi commented Feb 23, 2012

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

@rajarshi rajarshi closed this Feb 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment