allie-walker / Natural-product-function

scripts for predicting natural product activity from biosynthetic gene cluster sequences
MIT License
20 stars 8 forks source link

ERROR:did not find file containing training data, please keep script located in directory downloaded from github #4

Closed durubing-jn closed 2 years ago

durubing-jn commented 2 years ago

Hi, very cool works!!! Here is a error report. Using the command line method in a linux system, it told me that: "did not find file containing training data, please keep script located in directory downloaded from github" I am sure " cluster_function_prediction.py" script is in the folder. Thanks

allie-walker commented 2 years ago

Is the feature_matrices directory in the same directory as cluster_function_prediction.py? Also which branch are you using? we are currently changing the way training data is loaded in the new-model-training branch and so that one is likely broken right now but the master branch should still work.

durubing-jn commented 2 years ago

Thanks for your reply! They are in the same directory. Do I need to move "cluster_function_prediction.py" into feature_matrices folder? I also try to use master branch and v.1.0.0. They both have same errors. Can you give me a link which can work.

allie-walker commented 2 years ago

No, you don't need to move it. If you haven't moved any files since downloading the repository everything should be in the right place. We have not tested every combination of arguments so it is possible that there is a bug specific to the arguments you are using. Can you let me know the command you are using to run the program? If I can reproduce the bug then I can fix it. The other possibility is that it is an os-specific problem, but I think that is less likely since we have tested on linux so it would have to be specific to the version of linux you are using.

durubing-jn commented 2 years ago

ok,the command as follow: python (or python3) cluster_function_prediction.py BGCs_for_prediction/antiSMASH/cluster_example1.gbk BGCs_for_prediction/CARD/cluster_example1.txt --output test --antismash_version 5 --rgi_version 5

durubing-jn commented 2 years ago

Are there some suggestions for me?

allie-walker commented 2 years ago

If you make the program an executable using chmod: chmod +x cluster_function_prediction.py Then it should work with the following command: ./cluster_function_prediction.py BGCs_for_prediction/antiSMASH/cluster_example1.gbk BGCs_for_prediction/CARD/cluster_example1.txt --output test --antismash_version 5 --rgi_version 5

The issue is running it with python cluster_function_prediction.py leads to issues with the script being able to determine what directory its in. Let me know if that works for you!

durubing-jn commented 2 years ago

Thanks, it is working now!

allie-walker commented 2 years ago

Great! I'll go ahead and close the issue then. If you encounter any more problems, you can open a new issue!