-
Notifications
You must be signed in to change notification settings - Fork 32
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
Continuous covariates #247
Comments
Hey there @BEFH, The first thing would be to change the deseq2 module. I think if possible, you should also provide a test for the new functionality. The current deseq2 tests are done with the mus_musculus dataset, you can find the links to the files here. |
I think there needs to be some discussion over how to do this. My suggestion of an additional contrast sheet column is one way to do it, or we could automatically detect if the column looks like a float (double in R) before turning it into a factor and instead make sure it's coerced to a double, or there could be a pipeline option to list continuous variables (probably preferable). |
Hmm, I'm not sure if adding another param would be the best solution. |
This really just needs to be done in more or less the same way as the blocking. So a column for continuous covariates in the contrasts file. Yes, we'd have to make sure the validator understood about the new column, and verified that the listed covariates were present etc. There's no reason the existing test data can't be adapted, we can add a new fake continuous covariate column- the test data doesn't need to have scientific validity. |
My one concern with the design here is whether DESeq2 uses a Type I SS or a Type II SS. If it uses a Type II model, then linear covariates and blocking factors can be in different columns with no issues because order doesn't matter. If it's type I, I don't actually know. |
I'm not quite sure what you mean by Type I or II SS, but according to the DESeq2 vignette, the order of variables in the design does not matter (search for |
Hello! I came across this issue because I was searching for exactly this implementation, and I have a question before opening some PRs:
And as @pinin4fjords mentioned, the corresponding samplesheet should have the corresponding column filled with integer data. Let me know if I got the logic correctly and I can start with some PRs :) Thanks! |
Hey @ctuni, yes, that sounds about right. |
Description of feature
Many users including us would like to be able to include continuous covariates for the differential expression tests.
They could be added to the contrasts sheet like so:
Then in the modules/nf-core/deseq2/differential/templates/deseq_de.R:
At the beginning:
Then for building the variable list:
And finally for building the model:
However, there is still clearly work to be done in the Nextflow pipeline and documentation, and I don't know what to change there. If anyone could provide guidance on what to edit and what testing to do, I could do a pull request, but I don't know what to do at this point.
The text was updated successfully, but these errors were encountered: