Closed imagejan closed 8 months ago
(is it always 2?)
Actually, no, it's never padded. But the first part of the UUID is always eight characters, so we can adapt the pattern to be general. I'll follow up with a pull request.
I talked to Sabine and learned that stage position is dropped if only one position is acquired. So even more fun ;)
I would vote for a dedicated implementation SingleChannelStackAcquisition
which overwrites the regex pattern. I find it easier to keep the use-cases separated. But happy to be convinced otherwise!
Hm, I think regexes with optional match groups are not so bad, and I somehow dislike the idea of maintaining different but similar regex pattern in 6+ different places ({mixed, single-plane, stack} x {multi-channel, single-channel} x {multi-pos, single-pos}
).
How about using a common pattern with optional match groups, and separating the implementations just depending on the presence/absence of the optional group in the match, -- with minimal duplication of code 😄? I'll try to come up with a suggestion..
Sounds great!
One thing to keep in mind is that the final files-dataframe needs the columns field
and channel
i.e. they must be set, even if it is just 0. Otherwise the rest of the processing will fail.
@imagejan I had already started with a SingleChannelStackAcquistion
implementation on https://github.com/fmi-faim/faim-hcs/tree/single-plane-md and found a few edge cases that needed to be resolved. So far it works, but it is not as nice as your suggestion. I will use it tomorrow to convert the data from Clara, but I would not merge it this state and wait for you much better version :)
The MolecularDevices ImageXpress (Metamorph) format supports single-channel data where the channel name is not included in the filename. We need to update our regex patterns (1, 2, 3) to support this. What makes this a little complicated is the absence of a divider between the stage position (
_s*
) and the UUID, so that we need to know the number of digits used for the position index (is it always 2?):(As far as I can tell, the filename scheme with UUID suffix goes beyond the Metamorph nd/stk specification here: https://support.moleculardevices.com/s/article/MDA-file-formats)
/cc @tibuch @jluethi