https://github.com/sorgerlab/cycif
Raw File
Tip revision: 214d60f5c35ea5cf65f1bb27c19d1caaae9db0de authored by Jerry Lin on 05 May 2019, 03:22:41 UTC
A3&A4 scripts: processing & quantify Ashlar tiff
Tip revision: 214d60f
CycIF_filterbyhoechst.m
%% filter by hoechst 
%  processing CycIF table based on the CV of all Hoechst stains
%  Jerry 2016/08/25

function output_table = CycIF_filterbyhoechst(input_table,ch_hoechst,int_cut)

% input_table --> data table form CycIF_readtable
% index for hoechst columns


allhoechst = input_table{:,ch_hoechst};
allcv = std(allhoechst,0,2) ./ mean(allhoechst,2);
meancv = mean(allcv);
stdcv = std(allcv);

allmean = mean(allhoechst,2);
idx = (allcv < (meancv + stdcv)) & (allmean > int_cut);

output_table = input_table(idx,:);

%outputhoechst = allhoechst(allcv < cv_cut,:);
%allmean = mean(allhoechst,2);
%output_table = output_table(allmean > 5000,:);
return;
back to top