Skip to content

Program that plays a chaos game to generate a fractal given a genome sequence as input.

Notifications You must be signed in to change notification settings

MoBensaleh/Genome-Fractal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genome-Fractal

The "Chaos Game" is a popular algorithm for generating fractal patterns using numeric or discrete input sequences. By inputting a genomic sequence, a "chaos game representation" (CGR) of that sequence can be generated. This CGR can be used to study the characteristics of the genomic sequence.

The objective of this project is to develop a C program that can produce CGRs for genomic sequences. The program takes a single argument, a non-negative integer that is a power of 2. This value determines the size of the output CGR plot, which is N x N characters in size. The output is a text-based plot produced on the standard output. The program uses rational numbers to represent coordinates within the plot, and includes safeguards to prevent overflow during calculations.

To use the program, the user provides a genomic sequence on the standard input. The program then produces a CGR plot of the sequence, with each point (x,y) scaled to an integer value between 0 and N. The scaled coordinates for a point (x,y) are then recorded in an N x N character array, with the corresponding element set to an asterisk character ('*'). Once all points have been plotted, the contents of the array are output on the standard output, along with additional demarcation and labeling. The program is able to handle upper- and lower-case characters in the input sequence.

Overall, this C program provides a useful tool for studying the characteristics of genomic sequences using CGR plots.

Intructions for Running the Application

About

Program that plays a chaos game to generate a fractal given a genome sequence as input.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages