lotusnprod / lotus-web

Code for LOTUS web
https://lotus.naturalproducts.net/
MIT License
12 stars 5 forks source link

Bad SDF file when downloaded after similarity search #66

Open YulVoyn1401 opened 12 months ago

YulVoyn1401 commented 12 months ago

When trying to open the SDF file, downloaded after a similarity search with SMILES (returning ~ 200 molecules), the SDF file cannot be opened (bad file), neither with R, nor with a user interface chemical program, like ChemDraw.

> read.SDFset(sdf_file_path)
An instance of "SDFset" with 1 molecules
There were 26 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In FUN(X[[i]], ...) : bad key value pair found:
                                      V3000
2: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
3: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
4: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
5: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
6: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
7: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
8: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
9: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
10: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
11: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
12: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
13: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
14: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
15: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
16: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
17: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
18: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
19: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
20: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
21: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
22: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
23: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0
24: In FUN(X[[i]], ...) : bad key value pair found:
                                      0 0 V3000
25: In mde(x) : NAs introduced by coercion
26: In read.SDFset(sdf_file_path) :
  1 invalid SDFs detected. To fix, run: valid <- validSDF(sdfset); sdfset <- sdfset[valid]

> validSDF(sdf_file_path)

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘atomblock’ for signature ‘"character"’
In addition: Warning message:
In validSDF(sdf_file_path) : x needs to be of class SDFset
ayvan08 commented 6 months ago

Please share your complete file and you can use Progenesis SDF Studio (https://www.nonlinear.com/progenesis/sdf-studio/v1.0/download/) to fix your sdf files. I used the same. I also had an error where the molecule delimiter $$$$ was missing after each entry, I created a python code to add and fix that.

YulVoyn1401 commented 6 months ago

I am sorry, how to follow up on your answer to Issue #66, because I do not have a record of it.

On Wed, Mar 27, 2024 at 3:21 PM ayvan08 @.***> wrote:

Please share your complete file and you can use Progenesis SDF Studio ( https://www.nonlinear.com/progenesis/sdf-studio/v1.0/download/) to fix your sdf files. I used the same. I also had an error where the molecule delimiter $$$$ was missing after each entry, I created a python code to add and fix that.

— Reply to this email directly, view it on GitHub https://github.com/lotusnprod/lotus-web/issues/66#issuecomment-2022751181, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6HPEZH53T34JNTQN5PP7YTY2LBWXAVCNFSM6AAAAAA5QQBCVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSG42TCMJYGE . You are receiving this because you authored the thread.Message ID: @.***>