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

Prediction functions crash when filtered input is empty #136

Open
evancofer opened this issue Jan 28, 2020 · 0 comments
Open

Prediction functions crash when filtered input is empty #136

evancofer opened this issue Jan 28, 2020 · 0 comments
Labels

Comments

@evancofer
Copy link
Collaborator

Selene encounters an error when the user provides an empty bed file as input to get_predictions_for_bed_file (or an empty fasta file for get_predictions_for_fasta_file). Specifically, the value i (as used on line 428 and 517 in model_predict.py respectively) isn't defined. Since it's unlikely that a user would provide Selene with an empty file, it is worth noting that this error is also encountered when all of the records in the input file are filtered for some reason (e.g. if none of the chromosome names in a bed file match the chromosome names in the reference genome's fasta file). Handling this case more gracefully (e.g. via explicitly raising an exception or not crashing) would be ideal.

@evancofer evancofer added the bug label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant