getPowerSpectraSingle: Get the Fourier Power Spectrum for a single encoded Genomic...

Description Usage Arguments Value Examples

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

Description

This function produces the power spectrum of the Fourier transform for a single genomic signal that has been encoded using either the 2D or 4D representation, the function will produce an error if it is not supplied with a matrix of values that has a number of rows equal to 2 or 4.

Usage

1
getPowerSpectraSingle(encodedSignal)

Arguments

encodedSignal

is a genomic signal of interest, for which the average power spectrum will be computed and returned to the user, you may encode your genomic character strings by using the encodeGenomes or encodeGenome function in this package.

Value

A vector of values indicating the average power spectral density (according to the Fourier Transform) for the encoded genomes four, or two constituent signals.

Examples

1
2
3
4
5
MTHFR100 <- "TGGCCAGGTATAGTGGCTCATACCTGTAATCCCAGCACTCTGGGAGACCGAAGCAGTATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATG"; 
encMTHFR100 <- encodeGenome(MTHFR100); 
psMTHFR100 <- getPowerSpectraSingle(encMTHFR100); 
plot(psMTHFR100, type='l',xlab='Frequency/Sequency',
     ylab='Power Spectral Density', main="Power Spectrum of First 100 nucleotides of MTHFR"); 

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