| Version: | 0.0.2 | 
| Date: | 2025-05-09 | 
| Title: | Generates a Fractal Image of a DNA Sequence | 
| Maintainer: | Matthew Cserhati <matthew.cserhati@cui.edu> | 
| Description: | The function takes a DNA sequence, a start point, an end point in the sequence, dot size and dot color and draws a fractal image of the sequence. The fractal starts in the center of the canvas. The image is drawn by moving base by base along the sequence and dropping a midpoint between the actual point and the corner designated by the actual base. For more details see Jeffrey (1990) <doi:10.1093/nar/18.8.2163>, Hill, Schisler, and Singh (1992) <doi:10.1007/BF00178602>, and Löchel and Heider (2021) <doi:10.1016/j.csbj.2021.11.008>. | 
| License: | GPL (≥ 3) | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.3.2 | 
| Imports: | stringr, DescTools | 
| NeedsCompilation: | no | 
| Packaged: | 2025-05-09 18:33:52 UTC; E00358676 | 
| Author: | Matthew Cserhati | 
| Depends: | R (≥ 3.5.0) | 
| Repository: | CRAN | 
| Date/Publication: | 2025-05-09 22:50:07 UTC | 
Generates a DNA Sequence Based on an X and Y Coordinate over several iterations
Description
The function takes an X and Y coordinate and a number of bases to be represented in the DNA sequence. The function starts at the provided X and Y coordinates and then works backward, calculating every preceding base in the DNA sequence that led to that particular point in the fractal. Based on the actual X, Y point's coordinate, the base pair corresponding to that coordinate is inferred, and the DNA string will be built up and returned as the product of the function.
Version 0.0.1. Author: Dr. Matthew Cserhati Email: matthew.cserhati@cui.edu May 5, 2025
Arguments
| xstart | the starting x coordinate in the fractal image | 
| ystart | the starting y coordinate in the fractal image | 
| n | the number of bases to be calculated in the DNA sequence | 
Value
The DNA sequence
References
Jeffrey, H. J. (1990) Chaos game representation of gene structure. Nucleic Acids Research 18(8):2163-70.
Hill, K. A., Schisler, N. J., and Singh, S. M. (1992) Chaos game representation of coding regions of human globin genes and alcohol dehydrogenase genes of phylogenetically divergent species. Journal of Molecular Evolution 35:261-269.
Löchel, H. F., and Heider, D. (2021) Chaos game representation and its applications in bioinformatics. Computational and Structural Biotechnology Journal 19(2021): 6263-6271.
Examples
coordinates2sequence(-10,90,25)
Generates a Fractal Image of a DNA Sequence
Description
The function takes a DNA sequence up to 100 Kbp, a start point, an end point in the sequence, dot size and dot color and draws a fractal image of the sequence. The fractal starts in the center of the canvas. The image is drawn by moving base by base along the sequence and dropping a midpoint between the actual point and the corner designated by the actual base.
Version 0.0.1. Author: Dr. Matthew Cserhati Email: matthew.cserhati@cui.edu May 5, 2025
Arguments
| mx | a DNA sequence | 
| start | the starting position in the sequence to be fractalized | 
| end | the ending position in the sequence to be fractalized | 
| cex | the size of the dots in the fractal image | 
| dotcol | the color of the fractal image dots | 
Value
nil
References
Jeffrey, H. J. (1990) Chaos game representation of gene structure. Nucleic Acids Research 18(8):2163-70.
Hill, K. A., Schisler, N. J., and Singh, S. M. (1992) Chaos game representation of coding regions of human globin genes and alcohol dehydrogenase genes of phylogenetically divergent species. Journal of Molecular Evolution 35:261-269.
Löchel, H. F., and Heider, D. (2021) Chaos game representation and its applications in bioinformatics. Computational and Structural Biotechnology Journal 19(2021): 6263-6271.
Examples
dnafractal(human_mitogenome)
dnafractal(human_mitogenome,start=100,end=1000)
dnafractal(human_mitogenome,cex=1,dotcol="blue")
Human Mitochondrial Genome Sequence
Description
Human Mitochondrial Genome Sequence
Usage
human_mitogenome
Format
## 'human_mitogenome' Human Mitochondrial Genome Sequence
Returns a DNA base based on the sign value of an X and Y coordinate
Description
The function takes the sign of an X and Y value and returns the corresponding DNA base.
Version 0.0.1. Author: Dr. Matthew Cserhati Email: matthew.cserhati@cui.edu May 5, 2025
Arguments
| sx | sign of X coordinate | 
| sy | sign of Y coordinate | 
Value
The corresponding base
References
Jeffrey, H. J. (1990) Chaos game representation of gene structure. Nucleic Acids Research 18(8):2163-70.
Hill, K. A., Schisler, N. J., and Singh, S. M. (1992) Chaos game representation of coding regions of human globin genes and alcohol dehydrogenase genes of phylogenetically divergent species. Journal of Molecular Evolution 35:261-269.
Löchel, H. F., and Heider, D. (2021) Chaos game representation and its applications in bioinformatics. Computational and Structural Biotechnology Journal 19(2021): 6263-6271.
Examples
sign2base(-1,1)