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

indexing error. #116

Closed
3 tasks done
jgallowa07 opened this issue Aug 13, 2023 · 0 comments
Closed
3 tasks done

indexing error. #116

jgallowa07 opened this issue Aug 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jgallowa07
Copy link
Member

jgallowa07 commented Aug 13, 2023

Currently, we rely upon the integrity of unique indexing in the data.variants_df for binarymap, but also for Model.get_variants_df(), and Model.add_phenotypes_to_df() Methods. This is not a problem when collapsing barcodes because the index is naturally reset during the aggregation step. However, we have no checks and this caused a great amount of pain when debugging a recent CYP analysis for the Fowler lab. To fix this:

  • If we are not aggregating barcodes, we should simply reset the index - rather than a simple copy - to ensure the integrity of indices.
  • Make clear in the docs that the index of the passed in functional score dataframe is not maintained in the returned versions of variants dataframe for both Data.variants_df, and Model.get_variants_df method docstring.
  • For Model.add_phenotypes_to_df, we need to ensure that the passed dataframe has unique indices - but no need to reset - maintaining the passed index seems like the desired behavior, here. We can do this using a simple check
@jgallowa07 jgallowa07 added the bug Something isn't working label Aug 13, 2023
@jgallowa07 jgallowa07 self-assigned this Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant