Skip to content

Commit

Permalink
Moving beads found and events removed to separate folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfinck committed Jan 17, 2015
1 parent 14cdd18 commit 7fc1543
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions normalize_folder.m
Expand Up @@ -52,12 +52,18 @@ function normalize_folder(r)
rmv=r;
end

%bead directory is inside normed directory
%bead directory is no longer inside normed directory to make cytobank
%upload easier
bead_dir=[data_dir 'beads' filesep];
if ~exist(bead_dir,'dir')
mkdir(bead_dir)
end

rmv_dir=[data_dir 'removed_events' filesep];
if rmv && ~exist(rmv_dir,'dir')
mkdir(rmv_dir)
end

%update to not include skipped files
num_files=nnz(normthisfile);
if num_files==0 %only empty files were in folder
Expand Down Expand Up @@ -287,7 +293,7 @@ function normalize_folder(r)

if ~isempty(file.removed_events)
defAns={num2str(file.mahal_cutoff)};
fca_writefcs([bead_dir f{i}(1:end-4) '_normalized_removedEvents.fcs'],file.removed_events,file.markernames,file.channelnames,file.header);
fca_writefcs([rmv_dir f{i}(1:end-4) '_normalized_removedEvents.fcs'],file.removed_events,file.markernames,file.channelnames,file.header);
end
fprintf(fid,'Removing %g events from %s with beadDist <= %g\n',size(file.removed_events,1),f{i},file.mahal_cutoff);
end
Expand Down

0 comments on commit 7fc1543

Please sign in to comment.