remove_noise_from_matrix: Function to remove the noisy reads from the expression matrix

Description Usage Arguments Value See Also Examples

View source: R/remove_noise_from_matrix.R

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

1
2
3
4
5
6
7
8
9
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

remove_noise_from_bams

Examples

1
2
3
4
5
6
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
)

noisyr documentation built on April 16, 2021, 5:07 p.m.