reduceNoise: reduceNoise

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A function to reduce noise in SHAPE data. This function removes peaks that are high in both the base and the comparison SHAPE traces.

Usage

1
reduceNoise(sample, base=sample[1,], margin=1, trim=0, high=boxplot(sample)$stats[4])

Arguments

sample

A numeric matrix containing reactivity scores to be compared (e.g. a set of mutant SHAPE traces).

base

An optional numeric vector containing the reactivity score to which the samples are to be compared (e.g. a wild type SHAPE trace). Default is the first trace in sample.

margin

An optional number indicating if the samples are organized by rows or columns, where 1 indicates rows and 2 indicates columns. Default is 1.

trim

An optional number indicating the number of nucleotides to be trimmed from the each end. Default is 0.

high

An optional number indicating the value above which reactivities are considered high. Default is third quartile of sample.

Details

This function reduces the noise in SHAPE data. For positions where both the base vector and the sample row (or column) is above the high value, the position in the sample row (or column) is set equal to that position in the base vector. The function trims the data by setting the ends of sample equal to the ends of the base vector.

Value

A noise reduced numeric matrix with the same dimensions as sample.

Author(s)

Chanin Tolson

See Also

getFeatures

Examples

1
2
3
4
5
6
#sample data
sample = matrix(sample(1:100), ncol=10)
#normalize
samp_norm = normalize(sample)
#reduce noise
samp_nreduce = reduceNoise(samp_norm, trim=1, high=4)

cbtolson/classSNitch documentation built on May 13, 2019, 2:14 p.m.