Closed abrozzi closed 4 years ago
Hi Alex,
in general your model looks good. You could actually simplify it, by skipping the model.matrix()
call:
fit <-proDA(normalized_abundance_matrix, design = ~ geno + culture,
reference_level = "wt", col_data = sample_info_df)
result_names(fit)
test_diff(fit, contrast = "genoko")
Are the replicates in this case modelled as random effects?
Good question, the problem is that I never really know what is exactly mean with random effect (see this blog post by Andrew Gelman on the conflicting definitions).
I would say geno
is your coefficient of interest, you condition on the coefficient culture
and the replicates (for example sample 1 and 2 in sample_info_df
) are just considered that: independent draws from presumably the same distribution.
Best, Constantin
Brilliant!
And if I add an interaction term (geno x culture
):
> result_names(fit)
[1] "Intercept" "genoko" "cultureY" "genoko. cultureY"
can I get from proDA
the p-values for the interaction term?
Bests and thank again for this package, -A
There are two ways to test the significance of the interaction, which give equivalent results: First would be via a reduced model
test_diff(fit, reduced_model = ~ geno + culture)
The second is via a contrast
like this:
test_diff(fit, contrast = `genoko:cultureY`)
Note, that there is a bug right now in the result_names(fit)
call. The function trips over the :
and unfortunately turns it into a .
which is misleading. I will try and fix this asap. But you can just use the two calls above, both of which are fine :)
Okay I fixed the issue. If you now were to install the development version of proDA
, result_names()
would correctly return
> result_names(fit)
[1] "Intercept" "genoko" "cultureY" "`genoko:cultureY`"
Great! It works.
Thank you Constantin!
It works.
Great. If it is alright for you, I will close the issue. But feel free to reopen if anything else comes up :)
Hi Constantin! And thank you for
proDA
!I am extehnsively using it to find differentially expressed proteins in two different genetic backgrounds
wt
andko
cultured in two different mediaX
andY
. I have different biological preparations (A-O) and technical replicates (single, 2 or 3).The
sample_info_df
looks like this:To find differentially expressed proteins between
wt
andko
, accounting for the effect of the culturing medium, I do:Am I correctly interpreting the model implemented in
proDA
? Are the replicates in this case modelled as random effects?I thank you very much for any help you can give me, Alex