Hi,
I'm using Deseq compare differential abundance. Here is my code:
ds.all <- phyloseq_to_deseq2(ps0.infant.pbs, ~ sample_type)
geoMeans <- apply(counts(ds.all),1,gm_mean)
ds.all <- estimateSizeFactors(ds.all,geoMeans = geoMeans)
dds.all <- DESeq(ds.all,fitType = "local")
Then as the results I got 8 ASVs that showed significantly different.
My questions:
I used geoMeans is because otherwise DESeq() would fail with error:
Error in estimateSizeFactorsForMatrix(counts(object), locfunc = locfunc, :
every gene contains at least one zero, cannot compute log geometric means
So does that mean these two steps:
geoMeans <- apply(counts(ds.all),1,gm_mean)
ds.all <- estimateSizeFactors(ds.all,geoMeans = geoMeans)
are normalization steps of DESeq? Or there are other hidden normalization steps in DESeq?
How can I extract the normalized count table that DESeq used to generate the 8 ASVs? I tried counts(ds.all), but the count table is exactly the same with the raw count table.
I also tried counts(dds, normalized=T), it does look like a normalized count table, but how can I know if this is the exact normalized count table that deseq used for its analysis?
Thanks! Leran
I take it that for this application, it's okay for every gene to have a zero? Because in the regular bulk seq RNA that DESeq was designed for, that's not typical unless you have a couple of failed samples included.
phyloSeq manual instructs to do exactly that so... ¯_(ツ)_/¯