% LRIShuffleResults.m
% Look at LRIShuffleResults


% A. Statistic: NUMBER OF REPEATS

subplot(2,1,1)
orig_stat=sum(LRI_find_orig(:,3)>=.5)/numel(LRI_find_orig(:,3));

x=zeros(46,1);
for cc=1:46
    x(cc)= sum(LRI_find_surr{cc}(:,3)>=.5)/numel(LRI_find_surr{cc}(:,3));
end

hist(x,10);

hold on, plot( orig_stat,0,'*')


% B. Statistic:  DIST OF top 500 ranked surr's

% for original data


subplot(2,1,2)
[Y,I]=sort( LRI_find_orig(:,3),1,'descend');
plot( Y(1:700),'r' );

for cc=1:7

    [Y,I]=sort( LRI_find_surr{cc}(:,3),1,'descend');
    hold on, plot( Y(1:700) );

end

