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

Fix IndexError in create_long_loaddata #39

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

Conversation

mwhamgenomics
Copy link

Fixes the parsing of metadata from file names into Metadata_channel.

To determine the channel number of an image, parse.img_channel runs the equivalent of:

int(img_url.split('_')[3][1])

Before, it was running:

'Some example image_A02_s4BC203976-D332-4A32-A12B-64DEEEBCFBF8.tif' -> int(img_url.split('_')[3][1]) -> IndexError

The fix uses img_list instead of just_filenames:

'Some batch/2025-03-18/1234/TimePoint_1/Some example image_A02_s4BC203976-D332-4A32-A12B-64DEEEBCFBF8.tif' -> int(img_url.split('_')[3][1]) -> 4

I was surprised to find this, so this might need a second pair of eyes to make sure this fix is appropriate. My test was done with new_ix: true - maybe this needs to be applied only to new-format datasets?

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.

1 participant