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

Enable leafcutter-ds to handle a group_file with no confounder columns #255

Open
wants to merge 1 commit into
base: leafcutter2
Choose a base branch
from

Conversation

lianos
Copy link

@lianos lianos commented Jun 1, 2024

leafcutter-ds would error out when no confounder columns were present in group_file, this is an attempt to fix that.

  1. A default confounders = None variable is set
  2. A chunk of code that manipulates the confounders DataFrame was pushed up into the if len(meta.columns) > 2 block
  3. If no confounders are present, the counts DataFrame is subset to just include the samples defined in meta

Please note I'm not a Python or pandas guru, so I'm sure there may be better (more idiomatic) ways to do this, but this seems to do what I think is intended to setup the ultimate call to differential_splicing()

When no confounder columns were present in `group_file`, there would be multiple errors. This is an attempt to fix that.

1. A default `confounders = None` is set
2. A chunk of code that manipulates the `confounders` DataFrame was pushed up into the `if len(meta.columns) > 2` block
3. If no confounders are present, the `counts` DataFrame is subset to just include the samples defined in `meta`

Please note I'm not a Python or pandas guru, so I'm sure there may be better (more idiomatic) ways to do this, but this seems to do what I think is intended to setup the ultimate call to `differential_splicing()`
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.

1 participant