makeBinary | R Documentation |
This function takes a snap obj as input, then convert count matrix to a binary matrix.
makeBinary(obj, mat, outlier.filter)
obj |
A snap obj. |
mat |
A character class indicates what matrix slot to use c("bmat", "pmat", "gmat"). |
outlier.filter |
A numeric class within the range between 0 and 1. The non-zero elememnts in the count matrix are identified annd filtered as outliers (default 1e-3) |
It has been observed that some entries in the count matrix have exceedingly high value, which we suspect are due to alingnment or other type of errors. This function first identifies the top outlier.filter ( non-zero values in the count matrix as cutoff and then remove any values above this cutoff as outliers.
Returns a Snap obj with the binary matrix stored in obj@bmat
data(demo.sp); demo.sp = makeBinary(demo.sp, mat="bmat");
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.