科 / 研 / 图 / 像 / 处 / 理
了解这些因素如何影响细胞迁移能力,可以有助于理解多种生理和病理过程,并为治疗和预防相关疾病提供新的思路。
%% load and pre-process data
clear; close all;
rawData = readtable("Position.xlsx",'VariableNamingRule','preserve');
cellNum = (size(rawData,2) - 1) / 3;
cellPos = cell(1,cellNum);
for ii = 1:cellNum
tmpCellPos = table2array(rawData(:,ii*3:ii*3+1));
tmpCellPos(any(isnan(tmpCellPos),2),:) = []; % in case there is missing data
tmpCellPos = tmpCellPos - tmpCellPos(1,:); % set start point as zero
cellPos{ii} = tmpCellPos;
end
%% Plot migration
figureID = 1;
figure(figureID);
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin')
set(gcf,'position',[500,200,512,512]);
xlim([-100 100]);
ylim([-100 100]);
set(gca,'XTick',[]);
set(gca,'yTick',[]);
for ii = 1:length(cellPos)
tmpCellPos = cellPos{ii};
% plot traces
for jj = 1:size(tmpCellPos,1)-1
tmpX = tmpCellPos(jj:jj+1,1);
tmpY = tmpCellPos(jj:jj+1,2);
figure(figureID); hold on;
plot(tmpX,tmpY,'k-');
end
% plot end points
figure(figureID); hold on;
plot(tmpX(2),tmpY(2),'k.','MarkerSize',20);
end
最终效果:
动画效果:
▲细胞迁移轨迹动画
cellNum = (size(rawData,2) - 1) / 3;
tmpCellPos = table2array(rawData(:,ii*3:ii*3+1));
tmpCellPos(any(isnan(tmpCellPos),2),:) = []; % in case there is missing data
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin')
往期回顾
◆ 荧光强度测量