function cellAbs = PlateAbsSubtraction(orderedAbs) %To use this code, just enter your input file prefix here - filename = 'Full Plate Same Media Blank Test'; %and the path to where your data should be saved. If you don't specify an %output location, it will use the current directory. % outputpath = '~/Desktop/Chassis-System/Data/PlateReader/DedicatedTranslation/'; [TimeDataalpha, LabelDataalpha] = platereaderread2MG(filename); %% %============ %set smoothing parameters %============ method = 'fb'; if method == 'fb' | method == 'ff' cutofffreq = 0.15; neighbors = []; elseif method == 'co' cutofffreq = 0.15; neighbors = 9; elseif method == 'ma' cutofffreq = []; neighbors = 9; end plotunsmoothalpha = 0; plotsmoothalpha = 1; Absbackgroundsamplesalpha = []; experimentsamplesalpha = [1,2,3,4]; namesalpha = []; replicatesalpha = 3; samplesalpha = [experimentsamplesalpha,Absbackgroundsamplesalpha]; % Extract the data that we are interested in into three new variables. By % default, consider all timepoints and wells % timepoints = [1:size(LabelData,1)-1]; wellsalpha = [1:size(LabelDataalpha,2)]; timepointsalpha = [1:10]; timepointsbeta = [1:99]; % wells = [1:6]; rawAbsalpha = LabelDataalpha(timepointsalpha,wellsalpha,1); Timealpha = TimeDataalpha(timepointsalpha); %If your data has a fixed number of replicates for each sample and control, %and the replicates are in adjacent wells, use this code to reshape both %matrices so that the third dimension represents the different replicates orderedAbsalpha = reshape(rawAbsalpha,[size(rawAbsalpha,1),replicatesalpha,size(rawAbsalpha,2)/replicatesalpha]); %reorder the dimensions of the array so that the third dimension is the %number of replicates. orderedAbsalpha = permute(orderedAbsalpha,[1,3,2]); orderedAbsalpha = orderedAbsalpha(:,samplesalpha,:); orderedAbsalpha = mean(orderedAbsalpha(end-3:end,:,:),1) orderedAbsalpha = repmat(orderedAbsalpha,[max(timepointsbeta),1,1]) cellAbs = orderedAbs - orderedAbsalpha;