as.normalizedMatrix.rd
Convert a Normal Matrix to a normalizedMatrix Object
as.normalizedMatrix(mat, k_upstream = 0, k_downstream = 0, k_target = 0,
extend, signal_name = "signals", target_name = "targets",
background = NA, smooth = FALSE, smooth_fun = default_smooth_fun,
keep = c(0, 1), trim = NULL)
A matrix generated by other software.
Number of windows in the upstream.
Number of windows in the downstream.
Number of windows in the target.
Extension to the target. The length should be 1 (if one of k_upstream
or k_downstream
is zero). or 2 (if both of k_upstream
and k_downstream
are non-zero).
The name of signal regions. It is only used for printing the object.
The name of the target names. It is only used for printing the object.
The background value in the matrix.
Whether apply smoothing on rows in the matrix.
The smoothing function that is applied to each row in the matrix. This self-defined function accepts a numeric vector (may contain NA
values) and returns a vector with same length. If the smoothing is failed, the function should call stop
to throw errors so that normalizeToMatrix
can catch how many rows are failed in smoothing. See the default default_smooth_fun
for example.
Percentiles in the normalized matrix to keep. The value is a vector of two percent values. Values less than the first percentile is replaces with the first pencentile and values larger than the second percentile is replaced with the second percentile.
Deprecated, please use keep
instead.
If users use the matrix from other software, they can use this function to convert it to the normalizedMatrix
object
and visualize it afterwards.
A normalizedMatrix
object.
# There is no example
NULL
#> NULL