Description Usage Arguments Details Value Examples
View source: R/scMethrix_transforms.R
Transforms an assay in an scMethrix
object.
1 2 3 4 5 6 7 | transform_assay(
scm,
assay = "score",
new_assay = "new_assay",
trans = NULL,
h5_temp = NULL
)
|
scm |
|
assay |
string; name of an existing assay. Default = "score" |
new_assay |
string; name for transformed assay. Default = "new_assay" |
trans |
closure; The transformation function. Default = mean |
h5_temp |
string; temporary directory to store the temporary HDF5 files |
Uses the inputted function to transform an assay in the scMethrix
object. The function is
applied column-wise as to optimize how HDF5 files access sample data.
If HDF5 objects are used, transform functions need to accept 'DelayedMatrix' (e.g., from DelayedMatrixStats). Otherwise,
An scMethrix
object
1 2 | data('scMethrix_data')
transform_assay(scMethrix_data,assay="score",new_assay="plus1",trans=function(x){x+1})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.