PDA

View Full Version : Furutrad DNA tools - Chromosome 2D visualizer and comparison software



PeterLarsen
03-08-2014, 08:29 AM
Hi!

I am developing an experiment software that visualize your Autosomal result as a 2D picture. There are some built-in comparison possibilities. The tool (for Windows) is under development and can be downloaded from here:


http://artificial.se/Furutrad/

The chromosome visualization is basically a 4-way approach:

Divide the chromosome into 4 strings of A, C, G and T's of equal length.
Fold the strings like a 2D square using Hilbert space-filling curve algorithm.
Apply various imageprocessing filters and pattern recognition algorithms on the squares.
Apply colors to the squares using different presets.


The patterns themselves does not tell you anything, they are meaningless. The purpose is to find a way of comparing and finding matching patterns between autosomal kits, but the patterns is more like admixture finding than matching autosomal segments.

Here is a screenshot of the software:

http://artificial.se/Furutrad/FurutradDNATools13.jpg

Here is my 22 chromosomes visualized in one picture (Left: A, C and G. Right: C, G and T):

http://artificial.se/Furutrad/Furutrad-AllChromosomes37.jpg

... so now you have the possibility to add a graphical version of your DNA to your profile B)

Dr_McNinja
03-08-2014, 10:43 AM
How do we interpret the comparisons? And can you tell us more about the virtual child and random child options?

PeterLarsen
03-08-2014, 11:20 AM
The comparisons is done by comparing the resulting 2D image, it is a summarization of all differences. The whole idea is to get away from the 1d line comparisons that standard autosomal comparisons is made and instead compare overall patterns. It is more an admixture comparison than an "related with" comparison.

The virtual child mixes up DNA from both autosomal exports selected and generates a new one. It takes allele information in segments of random length from the "parents" and generates a new .csv-file. There is nothing special about it, just a simple combining algorithm.

Random child is currently unavailable. It is supposed to work like the virtual child although you need only to select one parent and from that it generates a new child where half the alleles is from the parent and other half is random. The random part is difficult, as SNP's isn't truly random so I need to apply some sort of probabilistic table and connect it to SNPedia (or something similar) to make it useful.

Most effort is actually put into the all chromosome visualizer, the comparison algorithm isn't that great as of yet which can easily be verified by generating a virtual child and the overall difference between a parent and a virtual child is often larger than comparing two unrelated autosomal exports.

Dr_McNinja
03-08-2014, 12:26 PM
But how do we tell if the image from one kit bears a greater or lesser resemblance to a third kit than another? It just comes out looking like random colorful noise.

So would using the virtual child function multiple times result in slightly different results each time?

PeterLarsen
03-08-2014, 12:27 PM
....
Most effort is actually put into the all chromosome visualizer, the comparison algorithm isn't that great as of yet which can easily be verified by generating a virtual child and the overall difference between a parent and a virtual child is often larger than comparing two unrelated autosomal exports.

I think I need to elaborate on the above statement. The purpose of the visualizer was to create human recognizeable patterns, eye-candy, so that all you see isn't only a picture of dots but distinct patterns. How the pattern algorithm now works: small differences in the allele leads to huge impacts on the generated patterns (it wouldn't be fun all having a similar looking picture), does have negative impact on the comparison algorithm. I will sooner or later add functionality to compare "non-patternized" 2D visualizations that will actually compare areas on the autosomal chromosomes 2d visualizations, and that will be of greater interests in comparing the overall structure.

As the focus now is on eye-candy patterns, the comparison algorithm suffers. It will soon be options to focus on either one: eye-candy or functional.

Dr_McNinja
03-08-2014, 12:30 PM
When I try to use the all chromosome visualizer, I get an error: "unhandled exception has occurred in your application" .. "index was out of range" ... "parameter name: index"


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at WindowsFormsApplication1.Form1.RemoveAutosomalNotS hared(autosomal a1, autosomal a2, String chr)
at WindowsFormsApplication1.Form1.visualizeChromosome (Int32 iChr, Int32 vType)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Furutrad14
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1
CodeBase: file:///C:/Users/McNinja/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/Furutrad%20-%20artificial.se/Furutrad14.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

PeterLarsen
03-08-2014, 12:31 PM
But how do we tell if the image from one kit bears a greater or lesser resemblance to a third kit than another? It just comes out looking like random colorful noise.

So would using the virtual child function multiple times result in slightly different results each time?

There is a textfield below the picture area where you can read the resulting differences between two kits chromosome. Yes, the virtual child option creates different childs every time even if the same parents is chosen because the inherited segment lengths is random.

PeterLarsen
03-08-2014, 12:33 PM
When I try to use the all chromosome visualizer, I get an error: "unhandled exception has occurred in your application" .. "index was out of range" ... "parameter name: index"

Oh great thanks!, I will look into that right away. Seems like there is an issue with the kit selector

Dr_McNinja
03-08-2014, 01:06 PM
The single chromosome comparison works, but I'm not sure why the 'Total diff all' value is higher with a virtual/phased child than it is to the other parent kit. It was 477k between me and the child (481k between other kit and child) and 474k between me and the other kit. How is that possible?

PeterLarsen
03-08-2014, 01:57 PM
The single chromosome comparison works, but I'm not sure why the 'Total diff all' value is higher with a virtual/phased child than it is to the other parent kit. It was 477k between me and the child (481k between other kit and child) and 474k between me and the other kit. How is that possible?

That is possible because of how the patterns is created. Depending on how the ACGT is structured any difference creates huge impact on the generated pattern. When using the "Solid" option, it will be more useful for comparisons but so far the comparisons only works on the patternized 2D visualizations. I tend to activate comparisons using the "Solid" visualizations as soon as the area comparison algorithm works better.

I tried fix the bug you found, version 1.14b is now available for download.

Dr_McNinja
03-08-2014, 03:24 PM
I still get this error when using All:


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WindowsFormsApplication1.Form1.RemoveAutosomalNotS hared(autosomal a1, autosomal a2, String chr)
at WindowsFormsApplication1.Form1.visualizeChromosome (Int32 iChr, Int32 vType)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Furutrad14b
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1
CodeBase: file:///C:/Users/McNinja/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/Furutrad%20-%20artificial.se/Furutrad14b.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

PeterLarsen
03-08-2014, 03:32 PM
I still get this error when using All:

That is strange, I don't get that error message. I will have a closer look at it and will try finding the actual error causing this problem.

Does your status say something like this when the error occurs:

Found start pos row number. Chr: 0 ...

? If it does, what is the whole sentence saying?

Dr_McNinja
03-08-2014, 04:06 PM
That is strange, I don't get that error message. I will have a closer look at it and will try finding the actual error causing this problem.

Does your status say something like this when the error occurs:

Found start pos row number. Chr: 0 ...

? If it does, what is the whole sentence saying?"Found start pos row number. Chr: 0, r1: 0, r2: 0, posdiff: 0"

PeterLarsen
03-08-2014, 06:42 PM
"Found start pos row number. Chr: 0, r1: 0, r2: 0, posdiff: 0"

Thanks! I have rebuilt the faulty function from scratch. Hopefully it will help, but I am not sure. Version 1.14c is now available for download

Dr_McNinja
03-08-2014, 07:29 PM
Sorry, still getting the same error when using the All button:


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WindowsFormsApplication1.Form1.RemoveAutosomalNotS hared2(autosomal a1, autosomal a2, String chr)
at WindowsFormsApplication1.Form1.visualizeChromosome (Int32 iChr, Int32 vType)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Furutrad14c
Assembly Version: 1.0.0.44
Win32 Version: 1.0.0.1
CodeBase: file:///C:/Users/McNinja/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/Furutrad%20-%20artificial.se/Furutrad14c.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

PeterLarsen
03-08-2014, 07:46 PM
Sorry, still getting the same error when using the All button:

Okay, thanks. I will look into it and try add some more error control, perhaps it has to do with .csv-files not structured the normal way. Are you using FTDNA autosomal exports or something else? So far I have only tested the tool with FTDNA .csv-files.

MfA
03-08-2014, 07:58 PM
I also had problem with my 23andMe file that converted to FTDNA format, but I fixed the problem by removing the extra X chromosome which comes with 23andMe file..

cool stuff :D
http://abload.de/img/coolstuffwion3.png

Dr_McNinja
03-08-2014, 09:21 PM
I also had problem with my 23andMe file that converted to FTDNA format, but I fixed the problem by removing the extra X chromosome which comes with 23andMe file..

cool stuff :D
http://abload.de/img/coolstuffwion3.pngThat's probably why I'm getting the error too

Dr_McNinja
03-08-2014, 09:24 PM
I also had problem with my 23andMe file that converted to FTDNA format, but I fixed the problem by removing the extra X chromosome which comes with 23andMe file..

cool stuff :D
http://abload.de/img/coolstuffwion3.pngDo you know any quick way of removing the extra chromosomes?