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

drugs descriptors that are not working for now (rcdk issue) #7

Open
MohammedFCIS opened this issue Jun 16, 2021 · 3 comments
Open

drugs descriptors that are not working for now (rcdk issue) #7

MohammedFCIS opened this issue Jun 16, 2021 · 3 comments

Comments

@MohammedFCIS
Copy link
Contributor

MohammedFCIS commented Jun 16, 2021

  • I opened a PR for that handle .jcall unexpected error CDK-R/cdkr#120
  • The descriptors are:
    • CPSADescriptor (geometrical)
    • GravitationalIndexDescriptor (geometrical)
    • IPMolecularLearningDescriptor
    • LengthOverBreadthDescriptor (geometrical)
    • MomentOfInertiaDescriptor (geometrical)
    • VABCDescriptor (topological)
    • WHIMDescriptor (hybrid)
    • extractDrugPetitjeanShapeIndex (for feature geomShape )
@MohammedFCIS
Copy link
Contributor Author

MohammedFCIS commented Jun 19, 2021

  • CPSADescriptor needs 3D structure
  • Converting smiles to 3d molecules (rcdk solution did not work)

@MohammedFCIS
Copy link
Contributor Author

MohammedFCIS commented Jun 22, 2021

  • There is a solution.
  • It needs a refinement
  • I will add these descriptors later when I finish
  • The analysis code is:
suppressMessages(library(dplyr))
# 1. get targets drugs
drugs_with_targets <- unique(dbdataset::Targets_Drug$parent_key)
smiles <- dbdataset::Calculated_Properties_Drug %>%
   filter(kind == "SMILES", parent_key %in% drugs_with_targets) %>% select(value) %>% pull()
sdf <- ChemmineR::smiles2sdf(smiles[1])
sdf <- ChemmineR::generate3DCoords(sdf)
tmpdest <- tempfile(pattern='xxx')
ChemmineR::write.SDF(sdf, tmpdest)
farr <- rJava::.jarray(tmpdest, contents.class = 'S')
molecules <- rJava::.jcall('org/guha/rcdk/util/Misc', '[Lorg/openscience/cdk/interfaces/IAtomContainer;',
                    'loadMolecules', farr, T, T, T,
                    check=FALSE)
#smile 13 causes issue (byro7 ma byrga3shi)
=========================================
which.desc <- "org.openscience.cdk.qsar.descriptors.molecular.ChiPathDescriptor"
featurea <- rcdk::eval.desc(molecules, which.desc)

@MohammedFCIS
Copy link
Contributor Author

check other descriptors with that solution

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

1 participant