I have run differentialabundance with 3 different ...
# differentialabundance
n
I have run differentialabundance with 3 different contrasts (I have 3 samples with different genotypes). When I inspect the disspersion plots, they look all exactly the same. Is this fitting the curve using the counts from all the samples? Is this the expected behaviour, or should we expect to use only the samples to be used in each contrast?
o
Hey there, yes, the dispersion plot is generated from all counts in the matrix so this is expected. @Jonathan Manning Should we maybe remove the prefix from this plot in the DESeq2 module so that repeated runs of the module simply overwrite the previous dispersion plot instead of saving it multiple times?
j
It would have to be a slightly more complicated solution than that, since I think if we activate https://nf-co.re/differentialabundance/1.5.0/parameters/#differential_subset_to_contrast_samples the plots would be different.
o
Aah true. I might open a PR about this some time.
j
Still pretty easy, just need a closure in the config
Copy code
prefix = { params.differential_subset_to_contrast_samples ? 'all' : contrast name }
o
Oh, I was thinking of changing the module. Or do you prefer just having a pipeline fix?
j
It does need to be a workflow thing, but it's actually a bit more complicated than I thought. I think we should publish the dispersion plot from DESEQ2_NORM (which only runs once) if that option is not set, and from DESEQ2_DIFFERENTIAL if it is.
o
I was thinking I could just modify DESeq2 to use the prefix only when the subset param is false. But yes, conditionally using NORM instead of DIFF would also work I think.
j
It IS running every time, so the prefix is valid. We just won't bother publishing that file when we don't need to
👍 1