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

Impossible to use training sets kept in other location than INSTALLATION_DIR #31

Open
pdec opened this issue Apr 21, 2020 · 1 comment

Comments

@pdec
Copy link
Collaborator

pdec commented Apr 21, 2020

I noticed that the below check forces users to keep their retrained reference datasets in INSTALLATION_DIR/PhiSpyModules/data directory

if not pkg_resources.resource_exists('PhiSpyModules', trainingFile):
sys.stderr.write("FATAL: Can not find data file {}\n".format(trainingFile))
sys.exit(-1)

The same will happen with kmers file within makeTest.py and makeTrain.py

kmers_file = 'data/phage_kmers_' + self._kmers_type + '_wohost.txt'
if not pkg_resources.resource_exists:
sys.exit("ERROR: Kmers file {} not found".format(kmers_file))
for line in pkg_resources.resource_stream('PhiSpyModules', kmers_file):

Hence, while retraining one needs to point the PhiSpy's installation dir (e.g. /usr/local/lib/python3.6/site-packages/PhiSpy...) and can't keep separate trainSets dirs.

@linsalrob
Copy link
Owner

I agree with this issue, but will not refactor the code for the current release. We will work on this for the next release.

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

No branches or pull requests

2 participants