# Talk:Chromosome structure via Euclidean Distance Matrices

(Difference between revisions)
Jump to: navigation, search
 Revision as of 15:20, 9 August 2008 (edit) (→E.coli realization)← Previous diff Revision as of 01:58, 26 August 2008 (edit) (undo)Next diff → Line 15: Line 15: close all close all - Xs = [zeros(3,1) sqrt(real(evals(1:3,1:3)))*real(evec(:,1:3))']; % Projection of -VDV on PSD cone rank 3 + Xs = [zeros(3,1) sqrt(real(evals(1:3,1:3)))*real(evec(:,1:3))']; % Projection of -Vn'D Vn on PSD cone rank 3 plot3(Xs(1,:), Xs(2,:), Xs(3,:), '.') plot3(Xs(1,:), Xs(2,:), Xs(3,:), '.')

## Revision as of 01:58, 26 August 2008

```%%% Ronan Fleming, E.coli molecule data
%%% -Jon Dattorro, August 9 2008
clear all
load ecoli

frame = 4;                                          % 1 through 12
G = her49imfs12movfull(frame).cdata;                % uint8
G = (double(G)-128)/128;                            % Gram matrix
N = size(G,1);

Vn = [-ones(1,N-1); speye(N-1)];
[evec evals flag] = eigs(Vn'*G*Vn, [], 20, 'LA');
if flag, disp('convergence problem'), return, end;

close all
Xs = [zeros(3,1) sqrt(real(evals(1:3,1:3)))*real(evec(:,1:3))'];  % Projection of -Vn'D Vn on PSD cone rank 3
plot3(Xs(1,:), Xs(2,:), Xs(3,:), '.')
```

## E.coli realization

Test image E.coli

I regard the autocorrelation data you provided as a Gram matrix.

Then conversion to a Euclidean distance matrix (EDM) is straightforward -
Chapter 5.4.2 of Convex Optimization & Euclidean Distance Geometry.

The program calculates only the first 20 eigenvalues of an oblique projection of the EDM on a positive semidefinite (PSD) cone -
Chapter 7.0.4 - 7.1 ibidem.

You can see at runtime that there are many significant eigenvalues; which means, the Euclidean body (the molecule) lives in a space higher than dimension 3, assuming I have interpreted the E.coli data correctly.

To get a picture corresponding to physical reality, we obliquely project the EDM on the closest rank-3 subset of the boundary of that PSD cone; this means, precisely, we truncate eigenvalues.

It is unlikely that this picture is an accurate representation unless the number of eigenvalues of that projection approaches 3 prior to truncation.

Matlab Figures allow 3D rotation in real time, so you can get a good idea of the body's shape.

I include a low-resolution figure here (frame 4) for reference.