evenlyScaleSingle: Evenly Scale Signals from their initial size of 'n' to size...

Description Usage Arguments Value Examples

View source: R/Yin-DFT-Distances-R.r

Description

This function will scale a power spectrum from an initial size of n to a size m. Note that the new signal size m must be larger than the original signal size n, but cannot be too large (larger than twich the original size).

Usage

1
evenlyScaleSingle(genomicPS, scaleTo)

Arguments

genomicPS

The Power Spectrum of the genetic sequence that is being scaled, in general this could be any arbitrary real sequence, however in keeping with the spirit of the packages overall usability, this function is defined in terms that relate to the genomic nature of the data used.

scaleTo

The length to which it is desired to scale the original spectrum. This is the same as the value m in the original paper by Yin et al. (2015).

Value

The scaled power spectrum, which is composed of the original sequence of length n, and is scaled to the new size of m or 'scaleTo'.

Examples

1
2
3
tg <- "ACCAGGAGATTAGAGCCCCAGAGTAGAGCCCCAGAGATTAGAGCCAGAGTGAGAGCCGANNNAGAGC"; 
pstg <- getPowerSpectraSingle(encodeGenome(tg,'2D')); 
scaled <- evenlyScaleSingle(pstg,80); 

mathornton01/Genomic-DFT-Yin-R documentation built on Dec. 21, 2021, 2:52 p.m.