Skip to content

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

Open
lianos wants to merge 1 commit intodavidaknowles:leafcutter2from
lianos:patch-1
Open

Enable leafcutter-ds to handle a group_file with no confounder columns#255
lianos wants to merge 1 commit intodavidaknowles:leafcutter2from
lianos:patch-1

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