% Gold Code % % Michael Wester, Stanly Steinberg and Flor Espinoza Hidalgo % Version of March 20, 2012 % University of New Mexico SpatioTemporal Modeling Center (UNM STMC) % % MATLAB package for computing Hopkins and Ripley (including bivariate Ripley) % statistics for positions of one or two sizes of particles in a cell membrane. % The data is assumed to be listed as text in a simple i, x(i), y(i) format % with filenames of the form BaseName_ParticleType.txt (e.g., 9021_5.txt). % The package can also detect particle clusters and hierarchical relationships % among them by performing a dendrogram analysis. This latter capability (the % dendrogram analysis) requires the MATLAB Statistics Toolbox to be installed. % The default interaction is through a GUI, although analyses can also be % performed via a command line interface. % % A variety of plots are produced. In addition, some text files are created: % analysis.txt for each experiment and particle size, the number of % particles analyzed, the percent in clusters, and the % sizes of the three largest clusters % analysis_crop.txt for each experiment, the area (in nm) contained % within the crop region, and for each particle size, % the total number of particles and the number within % the crop region % analysis_dendro.txt various outputs for the dendrogram analysis % % To analyze the Nick Andrews data, set STMC = true in analysis.m % To test the package, set STMC = false in analysis.m, then % start MATLAB in this directory and type the command "analysis". % % This package can be tested using the data in the subdirectory "data". % For comparison, the results for the test are stored in the subdirectory % "test_check". % Running the package, accepting all defaults and performing all analyses, % should replicate the test results in the subdirectory "results". % % The datasets are for experiments with names % 9021, 9028, and 9029 % along with some computer generated random data. % Each experiment has 2 or 3 files: % 9021_5.txt 9021_10.txt 9021_croparea.txt % 9028_5.txt 9028_10.txt 9028_croparea.txt % 9029_5.txt 9029_10.txt 9029_croparea.txt % random_5.txt random_10.txt % The _5.txt file contains the positions of the 5 nm gold particles % The _10.txt file contains the positions of the 10 nm gold particles % The _croparea.txt file defines a polygon corresponding to the cell membrane. % For the random data, the crop region defaults to the full image. % For this data: % The image size in pixels is 6000 x 7400 % The nanometers per pixel are 0.3629 nm/pixel % The pixels per nanometer are 2.7559 pixel/nm % % A Conditions.txt file (for analyzing a series of experiments % semi-automatically) can optionally be used. This file has the form % start end time(min) stimulus(ug/ml) % 9020 9030 1 0.000 % ... % where the first line is a header (which is ignored) and the following lines % contain four numbers: % start first numerical name in a series of experiments % end last numerical name in a series of experiments % time time (minutes) when the stimulus was applied after starting the % experiments % stimulus the amount of stimulus applied (ug/ml) % See "data/conditions/Conditions.txt" for an example. % % More information can be found in % Jun Zhang, Karin Leiderman, Janet R. Pfeiffer, Bridget S. Wilson, % Janet M. Oliver and Stanly L. Steinberg, % "Characterizing the Topography and Interactions of Membrane Receptors % and Signaling Molecules from Spatial Patterns Obtained using % Nanometer-scale Electron-dense Probes and Electron Microscopy", % _Micron_, Volume 37, Number 1, 2006, 14--34. % % Flor A. Espinoza, Janet M. Oliver, Bridget S. Wilson, Stanly L. Steinberg. % "Using Hierarchical Clustering and Dendrograms to Quantify the Clustering % of Membrane Proteins" % _Bulletin of Mathematical Biology_, Volume 74, Number 1, 2011, 190--211, % DOI: 10.1007/s11538-011-9671-3. % % Options: % % STMC = true defaults and special actions for use at UNM's STMC % (DEFAULT) % false % % GUI = true use a GUI frontend to read inputs (DEFAULT) % false read inputs from command line prompts % % crop_opt = '+' plot all points (DEFAULT) % '-' plot points outside the crop region specially % ' ' do not plot points outside the crop region % % Output figure extension: % fig_ext = 'pdf' Portable Document Format (DEFAULT) % 'eps' encapuslated PostScript % 'fig' MATLAB fig file % % Default font and line properties for plots: % font_props = {'FontSize', 15, 'FontWeight', 'bold'}; % line_props = {'LineWidth', 3}; % % hull_algorithm = 1 (DEFAULT), 2 or 3: % convex hull algorithm (see cluster.m); the default generally works and % should only be changed if there is an error in the cluster analysis % % (x, y) data in the BaseName_ParticleType.txt files are assumed to be in % columns (2, 3). For data located in different columns, modify the format for % the textread line in readfile.m, for example: % % % (x, y) data is in columns (2, 3). % [x, y] = textread(filename, '%*u %u %u %*u', 'headerlines', 1); % % (x, y) data is in columns (1, 2). % %[x, y] = textread(filename, '%u %u %*u %*u', 'headerlines', 1);