Description Usage Arguments Details Value Author(s) See Also Examples
Utilities to check inputs into batch correction functions.
1 2 3 4 5 | checkBatchConsistency(batches, cells.in.columns = TRUE)
checkIfSCE(batches)
checkRestrictions(batches, restrictions, cells.in.columns = TRUE)
|
batches |
A list of batches, usually containing gene expression matrices or SingleCellExperiment objects. |
cells.in.columns |
A logical scalar specifying whether batches contain cells in the columns. |
restrictions |
A list of length equal to |
These functions are intended for internal use and other package developers.
checkBatchConsistency will check whether the input batches are consistent with respect to the size of the dimension containing features (i.e., not cells).
It will also verify that the dimension names are consistent, to avoid problems from variable ordering of rows/columns in the inputs.
checkRestrictions will check whether restrictions are consistent with the supplied batches,
in terms of the length and names of the two lists.
It will also check that each batch contains at least one usable cell after restriction.
checkBatchConsistency return an invisible NULL if there are no errors.
checkIfSCE will return a logical vector specifying whether each element of batches is a SingleCellExperiment objects.
checkRestrictions will return NULL if restrictions=NULL.
Otherwise, it will return a list by taking restrictions and converting each non-NULL element into an integer subsetting vector.
Aaron Lun
1 2 3 4 | checkBatchConsistency(list(cbind(1:5), cbind(1:5, 2:6)))
try( # fails
checkBatchConsistency(list(cbind(1:5), cbind(1:4, 2:5)))
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.