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

_load_samples_metadata scrambles metadata #15

Closed
dmalzl opened this issue Dec 13, 2023 · 0 comments
Closed

_load_samples_metadata scrambles metadata #15

dmalzl opened this issue Dec 13, 2023 · 0 comments

Comments

@dmalzl
Copy link

dmalzl commented Dec 13, 2023

Hi I am using mofax to interpret some MEFISTO analyses and tried to plot the factors. When inspecting the plots I realised that they don't match my training setup. Upon closer inspection of what the mofax code does I found that _load_samples_metadata seems to rely on the assumption that model.samples and model.groups have the same ordering. However, model.samples is a dictionary which has no intrinsic ordering so in my case it happens that the two don't line up and thus when concatenating the two frames that are produced in this function the metadata does not line up correctly and as a result the plots do not resemble my training setup. I suggest to either just use model.groups as a unifying list of keys and iterate over model.samples instead of doing those separate, resetting the index and then concatenate two misaligned dataframes.

gtca added a commit that referenced this issue Oct 22, 2024
@gtca gtca closed this as completed Oct 22, 2024
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