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

First draft of subgroup normalization #39

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

bethac07
Copy link
Member

Might be made unnecessary by cytomining/pycytominer#154, but that's TBD. @ErinWeisbart, can you test when you get to the profiles stage of the cell painting project you just started? LMK if the implementation isn't self-evident in what you'd do to change the metadata and/or the actual config file you run.

@ErinWeisbart
Copy link
Member

ErinWeisbart commented Jun 1, 2023

Worked for me.

Minor suggestion:

  • I initially set the subgroup column name to what was in my metadata.csv but it required Metadata_ prepended to it (as happens during annotation). Might be handy to add in a small check like if not subgroup_col.startswith("Metadata_"): subgroup_col = "Metadata_"+subgroup_col

Bigger request:

  • I think the subgroup output name should be different to indicate that it underwent subgroup normalization instead of whole plate normalization (eg. _normalized_subgroup similar to how we output _normalized and _normalized_negcon)

@ErinWeisbart
Copy link
Member

I went ahead and wrote the "Bigger Request" because I wanted it for the batch I was processing.
Now, it will always have default behavior but if you set subgroup: true in normalize it will also output subgroup_normalized files. Additionally, if you set subgroup: true for feature_select it will output the default as well as subgroup_normalized_feature_selected

I have tested it on the one batch I was processing but have not otherwise done extensive testing.

@ErinWeisbart
Copy link
Member

We discussed today that we want to abstract the subgroup further and create a separate option normalize_subgroup similar to how normalize_negcon is separate from normalize.

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.

2 participants