inmoose.deseq2.estimateDispersionsPriorVar

inmoose.deseq2.estimateDispersionsPriorVar(obj, minDisp=1e-08, modelMatrix=None)

Low-level function to fit dispersion estimates

Normal users should instead use DESeqDataSet.estimateDispersions(). This low-level function is called by DESeqDataSet.estimateDispersions(), but is exported and documented for non-standard usage. For instance, it is possible to replace fitted values with a custom fit and continue with the maximum a posteriori dispersion estimate.

This function is called inside estimateDispersionsMAP(), and stores the dispersion prior variance as an attribute of DESeqDataSet.dispersionFunction, which can be manually provided to estimateDispersionsMAP() for parallel execution.

Parameters:
  • obj (DESeqDataSet) – the input dataset

  • minDisp (float) – small value for the minimum dispersion, to allow for calculations in log scale, one order of magnitude above this value is used as a test for inclusion in mean-dispersion fitting

  • modelMatrix (array-like) – for advanced use only, a substitute model matrix for gene-wise and MAP dispersion estimation

Returns:

the input obj with final MAP dispersion estimates

Return type:

DESeqDataSet