View source: R/normaliseRatio.R
normaliseRatio | R Documentation |
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'
normaliseRatio(ratioDF, rFactor = NULL, upperLimit = 2, replace = TRUE)
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). |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.