Skip to content

ENH set reference level in DeseqDataSet#109

Merged
BorisMuzellec merged 4 commits intomainfrom
set_ref_level
Apr 6, 2023
Merged

ENH set reference level in DeseqDataSet#109
BorisMuzellec merged 4 commits intomainfrom
set_ref_level

Conversation

@BorisMuzellec
Copy link
Copy Markdown
Collaborator

@BorisMuzellec BorisMuzellec commented Apr 4, 2023

What does your PR implement? Be specific.

This PR allows users to set the desired reference (control) level when creating a DeseqDataSet, instead of only the tested level as previously.

This ensures that users have control over the LFC coefficients created by a DeseqDataSet, so that they can ensure that the relevant coefficients exist when applying lfc_shrink, which wasn't the case when only the tested level could be set.

@BorisMuzellec BorisMuzellec marked this pull request as ready for review April 6, 2023 08:48
@BorisMuzellec BorisMuzellec requested a review from a user April 6, 2023 08:48
Copy link
Copy Markdown
Collaborator

@maikia maikia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

ref_level=["group", "Y"],
)

assert "group_X_vs_Y" in dds.obsm["design_matrix"].columns
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it might be worth for checking if it is correct? I still accept and leave the decision to you

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean checking whether the column contains correct data? It's true that this only checks that it exists.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I was thinking about. Would it be difficult to add?

@BorisMuzellec BorisMuzellec merged commit bac88cd into main Apr 6, 2023
@BorisMuzellec BorisMuzellec deleted the set_ref_level branch April 6, 2023 12:00
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