Description Usage Arguments Details Value Examples
Chaos Game Representation Object
1 
data 
Input as list/vector of characters from fasta file or similar 
seq.base 
By default the included unique elements in data will be used
in alphabetical order. It is also possible to define the alphabet
explicitly.

sf 
By default, the scaling factor for fractal polygons is used; the scaling factor can also explicitly set to values between 0 and 1. 
res 
resolution of the frequency matrix 
This function produces a chaos game representation (CGR) object from a sequence (data)
CGR object as list of:
matrix: frequency matrix with given resolution
x: xcoordinates for the CGR
y: ycoordinates for the CGR
sf: applied scaling factor for the CGR
res: applied resolution to calculate the FCGR
base.seq: chars or letters to build the edges of the CGR
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  ###HIV data
data("HIV")
### encoding the sequence
HIV.cgr = cgr(HIV, res = 100)
###plot the sequence
cgr.plot(HIV.cgr, mode = "points")
###plot the FCGR
cgr.plot(HIV.cgr, mode = "matrix")
###change the resolution of matrix from 100x100 to 200x200
cgr.res(HIV.cgr, 200)
### get the FCGR encoded vector
vectorize(HIV.cgr)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.