select_methods: Get a subset of normalizations from a SconeExperiment object

select_methodsR Documentation

Get a subset of normalizations from a SconeExperiment object

Description

This method let a user extract a subset of normalizations. This is useful when the original dataset is large and/or many normalization schemes have been applied.

In such cases, the user may want to run scone in mode return_norm = "no", explore the results, and then select the top performing methods for additional exploration.

Usage

select_methods(x, methods)

## S4 method for signature 'SconeExperiment,character'
select_methods(x, methods)

## S4 method for signature 'SconeExperiment,numeric'
select_methods(x, methods)

Arguments

x

a SconeExperiment object.

methods

either character or numeric specifying the normalizations to select.

Details

The numeric method will always return the normalization corresponding to the methods rows of the scone_params slot. This means that if scone was run with eval=TRUE, select_methods(x, 1:3) will return the top three ranked method. If scone was run with eval=FALSE, it will return the first three normalization in the order saved by scone.

Value

A SconeExperiment object with selected method data.

Functions

  • select_methods,SconeExperiment,character-method: If methods is a character, it will return the subset of methods named in methods (only perfect match). The string must be a subset of the row.names of the slot scone_params.

  • select_methods,SconeExperiment,numeric-method: If methods is a numeric, it will return the subset of methods according to the scone ranking.

Examples

set.seed(42)
mat <- matrix(rpois(500, lambda = 5), ncol=10)
colnames(mat) <- paste("X", 1:ncol(mat), sep="")
obj <- SconeExperiment(mat)
res <- scone(obj, scaling=list(none=identity, uq=UQ_FN),
           evaluate=TRUE, k_ruv=0, k_qc=0,
           eval_kclust=2, bpparam = BiocParallel::SerialParam())
select_res = select_methods(res,1:2)


YosefLab/scone documentation built on March 12, 2024, 10:48 p.m.