Need help creating Dynamic Circle

Hi All,

I am trying to make a dynamic DNA circle: basically, I want the users to be able to enter a DNA sequence (bunch of letters, essentially) and the software to make a big circle. In the example below, a DNA sequence of 7235 letters is created. The number of letters can differ from anywhere from 500 to 50,000.

I want the circle to be dynamic: we should be able to zoom into specific regions and see what the actual letters are. Similarly, when we zoom out, we should just see a black outline of the circle. I also want to be able to highlight specific letters in the inputted text and it should highlight that same region on the circle. Similarly, the user should be able to highlight/click regions of the circle and it will point out the specific letters in the inputted text.

I’ve recently immigrated from VB.NET and I am brand new to Xojo. Would really appreciate any help that I can get.

Thanks!

A simple test on my MacBook pro shows that drawing 50.000 characters takes 3.5 seconds.

On an optimization standpoint I would recommend first calculating the position of each DNA letter and depending on the zoom, drawing only the visible letters.
When the view is unzoomed, you might need to include some sort of buffering and even drawing one in 10 or 100 letters to avoid refresh issues and improve drawing performances.

As a Molecular Biologist I can tell you that drawing the base letters on the circle is silly. Do you expect anyone to read it upside down? And 50,000 is even sillier - you lack any precision in selecting anything.

Much better to show the sequence separately, allow precise selection in the sequence window, and show the selected segment in the graph.

[quote=372066:@Markus Winter]As a Molecular Biologist I can tell you that drawing the base letters on the circle is silly. Do you expect anyone to read it upside down? And 50,000 is even sillier - you lack any precision in selecting anything.

Much better to show the sequence separately, allow precise selection in the sequence window, and show the selected segment in the graph.[/quote]

You’re definitely right. That works as well. Can you recommend how to draw a graph and coordinate the position on the graph accordingly to a position in the sequence? Any guidance would appreciated!

Thanks.