| tune_deconv | R Documentation |
Performs an exhaustive grid search over a tuning grid of cell marker and
deconvolution parameters for either updateMarkers() (e.g. expfilter or
nsubclass) or deconvolute() (e.g. comp_amount).
tune_deconv(
mk,
test,
samples,
grid,
output = "output",
metric = "RMSE",
method = "top",
verbose = TRUE,
cores = 1,
...
)
mk |
cellMarkers class object |
test |
matrix of bulk RNA-Seq to be deconvoluted. Passed to
|
samples |
matrix of cell amounts with subclasses in columns and samples
in rows. Note that if this has been generated by |
grid |
Named list of vectors for the tuning grid similar to
|
output |
Character value, either |
metric |
Specifies tuning metric to choose optimal tune: either "RMSE", "Rsq", "pearson" or "resvar" (residual variance of bulk gene expression). |
method |
Either "top" or "overall". Determines how best parameter values are chosen. With "top" the single top configuration is chosen. With "overall", the average effect of varying each parameter is calculated using the mean R-squared across all variations of other parameters. This can give a more stable choice of final tuning. |
verbose |
Logical whether to show progress. |
cores |
Number of cores for parallelisation via |
... |
Optional arguments passed to |
Tuning plots on the resulting object can be visualised using plot_tune().
If best_tune is set to "overall", this corresponds to setting
subclass = NULL in plot_tune().
Once the results output has been generated, arguments such as metric or
method can be changed to see different best tunes using summary() (see
summary.tune_deconv()).
test and samples matrices can be generated by simulate_bulk() and
generate_samples() based on the original scRNA-Seq count dataset.
Dataframe with class 'tune_deconv' whose columns include: the
parameters being tuned via grid, cell subclass and R squared, RMSE,
pearson r^2, residual gene expression variance, prediction bias and
variance, and kappa (condition number).
plot_tune() summary.tune_deconv()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.