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

Bug fix for Fast5_to_seq_summary for directories with 1 fast5 file #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

godotgildor
Copy link

Currently, the code looks at the enumerate index i to see if a fast5 file was found in the given directory. However, if a directory does not have any files in it, then the enumeration loop won't get started and the i variable will actually be unbound, so the code as written would raise an UnboundLocalError. If there is a single fast5 file in the directory, then i will be valid, but it will be ==0, causing the current code to error saying that no fast5 files were found.

I've updated the logic to use a simple flag to indicate when we have actually inserted a fast5 file into the Queue during this loop.

Currently, the code looks at the enumerate index `i` to see if a fast5 file was found in the given directory.
However, if a directory does not have any files in it, then the enumeration loop won't get started and the
`i` variable will actually be unbound, so the code as written would raise an `UnboundLocalError`.
If there is a single fast5 file in the directory, then `i` will be valid, but it will be `==0`.

I've updated the logic to use a simple flag to indicate when we have actually inserted a fast5 file
into the Queue during this loop.
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

Successfully merging this pull request may close these issues.

None yet

1 participant