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

Order of the design when batch is added #10

Open
evaesquinas opened this issue Aug 9, 2023 · 0 comments
Open

Order of the design when batch is added #10

evaesquinas opened this issue Aug 9, 2023 · 0 comments

Comments

@evaesquinas
Copy link

Hello,

Reading the publication and checking the script made me ask about the orderof the design when batch is added.

According to the vignette of DESeq2, the condition of interest must be included at the end of the formula and in both cases (publication + script) appears at the beginning.

ddsMat_ribo <- DESeqDataSetFromMatrix(countData = ribo,
                                        colData = coldata_ribo, design =~ Condition + Batch)

ddsMat_rna <- DESeqDataSetFromMatrix(countData = rna,
                                       colData = coldata_rna, design =~ Condition + Batch)

Evidences from the vignette (copy-pasted):

  • Note: In order to benefit from the default settings of the package, you should put the variable of interest at the end of the formula and make sure the control level is the first level.
  • As condition is the variable of interest, we put it at the end of the formula.
  • The condition of interest should go at the end of the design formula, e.g. ~ subject + condition.

Therefore, my question would be: Is there any reason why the batch is included at the end of the formula and the condition is not added at the end?

Thanks very much in advance

Regards

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

1 participant