makeBinary: Convert the count matrix to binary matrix
Description
This function takes a snap obj as input, then convert count matrix to a binary matrix.
Usage
makeBinary(obj, mat, outlier.filter)
Arguments
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)
Value
Returns a Snap obj with the binary matrix stored in obj@bmat
Details
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.