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

Sample input and output with sample command #5

Closed
Danissss opened this issue Jan 30, 2020 · 3 comments
Closed

Sample input and output with sample command #5

Danissss opened this issue Jan 30, 2020 · 3 comments

Comments

@Danissss
Copy link

Hi
I ran this command ./DeepCCS predict -mp ../saved_models/default/ -ap ../saved_models/default/ -i "CN1C=NC(C[C@H](N)C(O)=O)=C1" -o result.csv, and it gives this error NameError: free variable 'table' referenced before assignment in enclosing scope

Could you give some sample input and output (with sample command)?

@ElinaFF
Copy link
Collaborator

ElinaFF commented Jan 30, 2020

Hi @Danissss
The error in your command is with the "-i" option. You gave it a string ( "CN1C=NC(CC@HC(O)=O)=C1") instead of a file.

So you juste have to create a file with at least the two necessary columns as the first line : SMILES,Adducts, and then put as lines the SMILES you want to predict with their adducts. In your case it could be CN1C=NC(C[C@H](N)C(O)=O)=C1,M+H if you want the CCS of this molecule to be calculated for the M+H ionization.

So the final command line would be ./DeepCCS predict -mp ../saved_models/default/ -ap ../saved_models/default/ -i test.csv -o result.csv , where test.csv is the file with your SMILES.

Hope it helps !
Élina

@Danissss
Copy link
Author

Thanks for the clarification!

@Danissss
Copy link
Author

I suggest to provide the sample test file as error indicates ValueError: Supplied file must contain at leat 2 columns named 'SMILES' and 'Adducts'. use the provided template if needed.

// test.csv
SMILES,Adducts
CN1C=NC(C[C@H](N)C(O)=O)=C1,M+H

Also, I need to use

import sys
sys.path.insert("some relative path")

to make the relative import works.

OS: MacOS Catalina
Python: 3.6
Env: Anaconda

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