normaliseRatio: A function to normalise ratio values from 'ratio' column of...

Description Usage Arguments Examples

View source: R/normaliseRatio.R

Description

A function to normalise ratio values from 'ratio' column of the provided dataframe to fit biologically-relevant scale. It scales values either using supplied 'rFactor' value or automatically to best fit 1 to 2 scale (the upper limit of the scale may be adjusted with the upperLimit parameter). Normalisation factor used is stored in 'ratioFactor' column and also passed as the dataframe comment. To extract it, use 'attributes(mergedBed)$comment'

Usage

1
2
normaliseRatio(ratioDF, rFactor = NULL, upperLimit = 2,
  replace = TRUE)

Arguments

ratioDF

A ratio dataframe containing 'ratio' column (dataframe).

rFactor

Value to normalise by, related to replication progression (numeric, optional).

upperLimit

Top value for the scale, defaults to 2 (numeric, optional, defaults).

replace

Should the existing 'ratio' values be overwritten or stored in a new column (boolean, defaults to TRUE).

Examples

1
2
3
ratioDF <- normaliseRatio(W303) ## scales to 1 to 2 range, replaces original values.
ratioDF <- normaliseRatio(W303,rFactor=1.41,replace=FALSE)
# (multiplies score values by 1.41 and keeps the original values)

Repliscope documentation built on July 15, 2019, 5:02 p.m.