metamaden / lute

R package for deconvolution simulation and optimization.
2 stars 0 forks source link

Lute when typemarkerAlgorithm=NULL #3

Closed dagarfield closed 2 months ago

dagarfield commented 3 months ago

Hello!

Following the tutorial, I'm running lute using a medium sized single-cell reference and a 20 sample Bulk RNA-seq experiment as follows:

experiment.results <- lute(
  singleCellExperiment=sce, cellTypeVariable = "updated_cell_type",
  bulkSummarizedExperiment=se, typemarkerAlgorithm=NULL
)

What I'm struggling with is the typemarkerAlgorithm=NULL and why this function is able to run so much faster than when that argument is removed (and markers are calculated). As it says in the tutorial:

By default, lute used the mean ratios algorithm to get markers, then the NNLS algorithm to get cell type proportion predictions.

But that doesn't seem (from the instructions) like that is what is happening with the NULL value, and I admit to being a bit confused how this could work at all without some sort of marker calculation.

Thanks!

metamaden commented 3 months ago

Hello,

Thank you for bringing this issue to our attention, and my apologies for the delay in getting back to you.

The typemarkerAlgorithm argument allows users to set a marker selection algorithm. At this time, the options are either the mean ratios method or NULL for no marker selection algorithm. Alternatively, one could perform marker selection as part of their script, then call lute() with typemarkerAlgorithm=NULL to avoid further marker selection.

Of course, in the context of deconvolution, markers should be germaine to predicting the cell type proportions in the bulk or pseudobulk sample(s). The important decision of how and whether to select markers depends on the extent of your data processing (e.g. quality and other filtering steps), and algorithm tolerances for passed marker IDs, marker expression characteristics, cell characteristics, and tissue characteristics.

typemarkerAlgorithm and deconvolutionAlgorithm are the key arguments available in lute(). When neither argument is NULL, the first argument selects markers, and the second argument calls a deconvolution algorithm on expression at the selected markers. For example, here are details about 4 essential cases for these 2 arguments:

To address this issue, I patched lute to revise the vignette wording for clarity, update the typemarkerAlgorithm argument default to be NULL, and update the user's guide and docstrings. The commit for this patch is viewable here, and patch is reflected in lute v1.1.1, which will soon be available on Bioconductor dev branch.

Please let me know if you have further questions.

Best regards,

Sean

dagarfield commented 2 months ago

Fantastic, thanks!