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

Keyval from CSV support choice of Value separator #213

Open
will-moore opened this issue Nov 17, 2023 · 2 comments
Open

Keyval from CSV support choice of Value separator #213

will-moore opened this issue Nov 17, 2023 · 2 comments

Comments

@will-moore
Copy link
Member

Currently, if you have a value that contains ; then the value is split on this token and multiple Key:Value pairs are created from the same Key:

vals = row[i].strip().split(';')

However, I wanted to use this script with a csv I downloaded from
https://zenodo.org/record/7308444/files/Davis%20lab%20200%20YFP%20trap%20expression.csv?download=1
which works with images from https://zenodo.org/record/7308444/files/Figures.zip?download=1
(paper at https://rupress.org/jcb/article/222/6/e202205129/214092/Systematic-analysis-of-YFP-traps-reveals-common)

That csv uses commas to separate multiplr values, e.g. "synapse, cytoplasm, plasma membrane".
I manually changed the script to split on ", " and this worked great, but it would be nice to have the option to choose this separator:

Screenshot 2023-11-17 at 12 57 00

cc @Tom-TBT since I think your changes at https://github.com/German-BioImaging/omero-scripts/tree/xtnd_support_kvpairs remove this support for multiple Values?

@Tom-TBT
Copy link
Contributor

Tom-TBT commented Nov 17, 2023

I removed it because I considered it an "unexpected feature". Happens that there are , in a value, and I don't want the regularuser to find his values splitted.

I consider it to be an "advanced feature", so I can reintroduce it as a string parameter (can be one or more character). If left empty, no splitting is done

@will-moore
Copy link
Member Author

Sounds good, thanks! 👍

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

No branches or pull requests

2 participants