I'm working in the analysis of some RNAseq data with DeSeq2.
I have 2 conditions, treated and untreated, for two strains, mutant and wild type. With three replicates for each one, in total 12 samples.
I have done all the possible comparisons from the results function, specifying which experiments must be compared to define the numerator and denominator of the fold change relation.
Now I'm wondering if it is possible to get the standard deviation of the genes with significant differential expression across comparisons.
I have followed this manualĀ https://www.bioconductor.org/packages/3.3/bioc/vignettes/DESeq2/inst/doc/DESeq2.pdf and it looks like it is possible to do it, but in some sort of separate way, it is possible to plot the expression levels of a specific gene through the conditions, section 1.5.2 and figure 2, and also its possible to plot the standard deviation of the transformed count data, section 2.1.5 and figure 4.
I'm not familiar with R, but in a naive guess, I think it is possible to select which data is going to be plotted from the result of the DESeq function on the count data (dds).
Could you please give some example or some insight on how I should do the calling or the filtering on the dds to get the standard deviation of the counts (transformed or not) for the significant genes, padj below 0.05?
Thank you
Yes I would like to filter or create a subset from the matrix with the columns of the related replicates and then do the standard deviation calculation for that group.
Would m[,col_i:col_j] do the filtering, where the columns relate to the conditions? Then assign it to a new variable (m_condition) and then applying sd to it, as your example?
Here is some general R code for calculating the sample standard deviation of groups of a matrix. Again, I don't know what purpose you have for this, so use at your own discretion.