Just followed the vignette to run Swish for the first time using inferential replicates computed by salmon, on data from an F1 cross of two non-B6 mouse strains. It seemingly worked great (including the import via tximeta) and was rather easy, so thanks for that!
One thing I noticed is how it's seemingly designed for only two experimental conditions (treatment vs reference) to be handled at a time. The code in the vignette implies that if you have more than two conditions, you can subset your se object and test separately like so:
y <- se[,se$condition %in% c("control1","treated1")] y$condition <- factor(y$condition, levels=c("control1","treated1")) y <- scaleInfReps(y) y <- labelKeep(y) y <- swish(y, x="condition")
z <- se[,se$condition %in% c("control2","treated2")] z$condition <- factor(z$condition, levels=c("control2","treated2")) z <- scaleInfReps(z) z <- labelKeep(z) z <- swish(z, x="condition")
It could be a nice improvement to enable the use of contrasts a la DESeq2, something equivalent to:
res1 <- lfcShrink(dds, contrast=c("condition","treated1","control1"), type="ashr") res2 <- lfcShrink(dds, contrast=c("condition","treated2","control2"), type="ashr")
Given the statistical benefit on the DESeq2 side of including all samples together in the same normalization framework, I assume the same is not true for Swish's underlying method, both in terms of detection of differential expression and in reporting normalized/scaled counts?