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

test for continous variables #369

Open
RunyuXia opened this issue Feb 27, 2025 · 1 comment
Open

test for continous variables #369

RunyuXia opened this issue Feb 27, 2025 · 1 comment

Comments

@RunyuXia
Copy link

Hello,
I'm trying to test for a continuous variable using PyDESeq, with it being the only variable in my design matrix. I found a suggestion in previous issues to set the contrast in DeseqStats as contrast = ["my_continuous_covariate", "", ""]. However, when I implemented this, I encountered the following error. Could someone help me troubleshoot this issue?
Thank you!

Image
@BorisMuzellec
Copy link
Collaborator

Hi @RunyuXia, are you using the 0.5.0 version of pydeseq2?

If so, contrasts for continuous variables should be directly provided as a numerical contrast vector, with a coefficient (usually 0, 1 or -1) for each column of the design matrix (something like contrast = np.array([0, 0, 1]) where the 1 is at the index of your numerical column).

cf https://pydeseq2.readthedocs.io/en/latest/auto_examples/plot_step_by_step.html#statistical-analysis

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