Skip to content

Commit

Permalink
Added modification to remove the quantileNorm and just do sum in the …
Browse files Browse the repository at this point in the history
…normalization step, increasing speed.
  • Loading branch information
dgoodwin208 committed Oct 2, 2020
1 parent db5477f commit 7414e5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions loadParameters.m.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ params.NUM_ROUNDS = 5;
params.BEAD_ZSTART = 1; %goes to :end
params.COLOR_OFFSETS3D = [20,20,20];

%If the channel data come from very different distributions, applying a quantile Norm
%can be useful when combining channel information for the registration. However,
%it is highly memory and time intensive, using any other paramter but 'quantile' will
%simply sum the channels in the normalization step, and this can reduce comptuation time
%by 20-50%!
params.NORMALIZE_METHOD = 'quantile';


params.PUNCTA_SIZE_THRESHOLD = 30;
params.PUNCTA_SIZE_MAX = 2000;
Expand Down
10 changes: 9 additions & 1 deletion stage_normalization/normalizeImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ function normalizeImage(src_folder_name,dst_folder_name,fileroot_name,channels,r
end

% Normalize the data
data_cols_norm = quantilenorm(data_cols);
% NEW: Added the flexiblity to skip the quantile normalization. Providing the channels
% are from a similar distribution, it can greatly increase speed and reliability to simply
% sum the non-normalized channels
if strcmp(params.NORMALIZE_METHOD,'quantile')
data_cols_norm = quantilenorm(data_cols);
else
data_cols_norm = data_cols;
end

clearvars data_cols;

% reshape the normed results back into 3d images
Expand Down

0 comments on commit 7414e5c

Please sign in to comment.