However, when it comes to pulling out the results, I want to get the main effect of genotype (B6 vs. TCR) and age (postnatal day 6 and 24) while "collapsing" across the other variable in the design.
As per the DESeq2 vignette, I've done using numeric contrasts that include the simple main effect and the average of the interaction effect, as shown below:
resultsNames(dds) [1] "Intercept" "W_1" "Timepoint.Group_P24_vs_P6" [4] "Genotype_TCR_vs_B6" "Timepoint.GroupP24.GenotypeTCR"
## main effect of genotype col_res_geno_ME <- as.data.frame(results(dds, contrast=c(0,0,0,1,0.5)))%>% filter(padj < 0.05 & abs(log2FoldChange) > 0.1)%>% arrange(desc(abs(log2FoldChange)))
However, I'm not sure whether to include a numeric contrast of 1 for W_1, seeing as I want to ensure that the normalization factor is accounted for.
In the example analysis, the effects/contrasts of interests are simply pulled out by name, so I am unsure what effect this has on the influence of W_1.
Hi there,
I just had a quick question regarding the DA analysis in the sabry_analysis tutorial.
Once normalized, I'm trying to pull out specific contrast effects in my data regarding genotype and age groups.
When building my DESeq2 model, as in the vignette, I'm using the raw counts and incorporating the weight
W_1
from running RUV_total.dds <- DESeqDataSetFromMatrix(countData = filt_counts, ## codeset of endogenous genes colData = pData(ile_set), ## metadata design = ~ W_1 + Timepoint.Group*Genotype) dds <- DESeq(dds)
However, when it comes to pulling out the results, I want to get the main effect of genotype (B6 vs. TCR) and age (postnatal day 6 and 24) while "collapsing" across the other variable in the design.
As per the DESeq2 vignette, I've done using numeric contrasts that include the simple main effect and the average of the interaction effect, as shown below:
resultsNames(dds) [1] "Intercept" "W_1" "Timepoint.Group_P24_vs_P6" [4] "Genotype_TCR_vs_B6" "Timepoint.GroupP24.GenotypeTCR"
## main effect of genotype col_res_geno_ME <- as.data.frame(results(dds, contrast=c(0,0,0,1,0.5)))%>% filter(padj < 0.05 & abs(log2FoldChange) > 0.1)%>% arrange(desc(abs(log2FoldChange)))
However, I'm not sure whether to include a numeric contrast of 1 for
W_1
, seeing as I want to ensure that the normalization factor is accounted for.In the example analysis, the effects/contrasts of interests are simply pulled out by name, so I am unsure what effect this has on the influence of W_1.
Any help would be appreciated!