remove_noise_from_matrix {noisyr} | R Documentation |
Function to remove the noisy reads from the expression matrix
Description
This function is used to remove the noisy reads from the expression matrix. It uses as input a vector of abundance thresholds; all entries below the noise threshold are replaced with the noise threshold.
Usage
remove_noise_from_matrix(
expression.matrix,
noise.thresholds,
add.threshold = TRUE,
average.threshold = TRUE,
remove.noisy.features = TRUE,
export.csv = NULL,
...
)
Arguments
expression.matrix |
the expression matrix |
noise.thresholds |
a vector of expression thresholds by sample; must be the same length as the number of columns of the expression matrix, or a singular value to be used as a fixed noise threshold |
add.threshold |
whether to add the noise threshold to all values in the expression matrix (default), or set entries below the threshold to the threshold |
average.threshold |
if TRUE (default), uses tthe average of the vector of thresholds across all samples; if FALSE, uses the thresholds as supplied |
remove.noisy.features |
logical, whether rows of the expression matrix that are fully under the noise threshold should be removed (default TRUE) |
export.csv |
option to write the matrix into a csv after the noise removal; should be NULL or the name of the output file |
... |
arguments passed on to other methods |
Value
Returns the expression matrix with the noise removed. Under default parameters, the denoised matrix will have fewer rows than the input matrix and will have no entries remaining below the noise threshold.
See Also
Examples
expression.matrix <- matrix(1:100, ncol=5)
noise.thresholds <- c(5,30,45,62,83)
remove_noise_from_matrix(
expression.matrix = expression.matrix,
noise.thresholds = noise.thresholds
)