SFMetrics: an analysis tool for scanning force microscopy images of biomolecules
BMC Bioinformatics volume 16, Article number: 27 (2015)
Scanning force microscopy (SFM) allows direct, rapid and high-resolution visualization of single molecular complexes; irregular shapes and differences in sizes are immediately revealed by the scanning tip in three-dimensional images. However, high-throughput analysis of SFM data is limited by the lack of versatile software tools accessible to SFM users. Most existing SFM software tools are aimed at broad general use: from material-surface analysis to visualization of biomolecules.
We present SFMetrics as a metrology toolbox for SFM, specifically aimed at biomolecules like DNA and proteins, which features (a) semi-automatic high-throughput analysis of individual molecules; (b) ease of use working within MATLAB environment or as a stand-alone application; (c) compatibility with MultiMode (Bruker), NanoWizard (JPK instruments), Asylum (Asylum research), ASCII, and TIFF files, that can be adjusted with minor modifications to other formats.
Assembled in a single user interface, SFMetrics serves as a semi-automatic analysis tool capable of measuring several geometrical properties (length, volume and angles) from DNA and protein complexes, but is also applicable to other samples with irregular shapes.
Quantification of structural features from individual molecular complexes is used to explain their mechanism of action. Single-molecule imaging is a valuable tool in this sense because it reveals different stages of assembly and function. Functional assemblies of biomolecules are inherently flexible, variable and irregular. DNA and proteins are easily identified by SFM without staining procedures in conditions compatible with biochemical function (no vacuum, room temperature) . Dozens of images with hundreds of molecules each can be routinely produced in one day. However there is no single software platform that allows semi-automatic and high-throughput data analysis. Usually data analysis requires the use of different, sometimes multiple, software programs none specifically designed for DNA and protein analysis.
Software analysis is generally provided as part of the microscope operating system software. For example, ‘NanoScope Analysis’ from Bruker and ‘JPKSPM Data processing’ from JPK Instrument software packages open their own generated images, allowing some basic filtering operations like flattening, but also other metrological operations like point to point length measurements, or volume analysis from selected particles. SPIP™ (Scanning Probe Image Processor- ImageMetrology) is a dedicated metrological tool for SFM that supports many formats but requires additional license payment. There are several open licensed software packages available for SFM. Image SXM was developed by S D Barret (http://www.ImageSXM.org.uk) in 1993 based on the image analysis software NIH Image (now ImageJ) . Image SXM handles scanning microscope image files from more than 40 different instruments. It has many processing options and has been the standard SFM software analysis in many laboratories (including ours). However, it is limited to Mac OS system computers and some of the functions required for analysis of multiple particles in one image can be time-consuming. Unfortunately ImageJ software, compatible with many operating systems, did not evolve in the same manner and only a few plugins like ‘Open NV.java’ and ‘Open MI.java’ have been developed for opening SFM images. WSxM, developed by Nanotec in 2001 , is a Windows application for data acquisition and processing of scanning probe microscopes images. WSxM is compatible with most of the microscope manufacturers file formats and has common image processing operations, but it does not support high-throughput data analysis of individual complexes. Gwyddion  was developed in 2004 as a multiplatform for visualization and data analysis from scanning probe microscopes. Gwyddion runs in different operating systems and, among other multiple processing tools, allows statistical analysis of multiple particles detected with a variety of filters. However, selection of particles or measuring some individual features like contour length from irregular objects is not possible (see Table 1 for a comparison of these software tools).
Here we present an open-licensed software for Windows using the stand-alone version (also Linux or OSX with MATLAB installed using the scripts) specifically aimed at the analysis of DNA and proteins. At the core of the software is a versatile edge detection algorithm that efficiently selects irregular objects from the background making volume and length determination straightforward. SFMetrics has been developed for efficient high-throughput analysis of individual particles with irregular shapes like biomolecules. Functionalities have been reduced to operations commonly applied to biomolecules (volume, contour length, height profile, width and angle measurement) for shortening the analysis time and for facilitating access for users unfamiliar with image processing techniques.
SFMetrics was developed in MATLAB (Release 2013b, The MathWorks, Inc., Natick, Massachusetts, United States) as a graphical user interface (GUI) for the geometrical analysis of DNA and protein molecules in SFM images. MATLAB scripts and the stand-alone version for Windows (64bit version) can be found here (http://cluster15.erasmusmc.nl/TIRF-SFM-scripts). If used under MATLAB, it requires MATLAB 2013b, or newer, Curve Fitting and Image Processing Toolboxes. If used as a stand-alone application, MATLAB Component Runtime (MCR) is required (available to download with the software package). It has a free license for non-commercial use.
SFMetrics can open image data files from NanoScope (v5.30v2), JPK (4.2.53), and Asylum Research microscopes by clicking ‘MultiMode’, ‘JPK’, or ‘Asylum’ button respectively. It can open NanoScope files using the MATLAB script ‘open_di.m’ (Jennifer R. Hampton, Hope College; details at http://nanoprobenetwork.org/) modified for extracting pixel resolution. JPK files have two images stored in a TIFF (Tag Image File Format) standard version 6.0 (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf) that can be opened in MATLAB by using the ‘imread.m’ function (core MATLAB toolbox). The first image is a thumbnail version of the second containing the actual scan dimensions. JPK files are automatically calibrated by using the formula:
Result = offset + multiplier * value (Thomas Henze JPK instruments, personal communication).
Multiplier and the offset values are stored in the fields ‘Unknowntag(36)’ and ‘Unknowntag(37)’, as read by ‘imread.m’ respectively, if the image was saved with software versions previous to 4.2.53. If the image was saved with software version 4.2.53, the multiplier and the offset are in the fields ‘Unknowntag(37)’ and ‘Unknowntag(38)’ respectively. Asylum research files (Igor Pro file format- ibw) are opened using the MATLAB script ‘IBW.m’ (developed by Jakub Bialek and available at MATLAB central http://www.mathworks.nl/matlabcentral/). ASCII (American Standard Code for Information Interchange) files with pixel coordinates (xy) and intensity (z), including or not header lines, can be opened with the ‘ASCII’ button. TIFF, JPEG, and PNG files can be opened with the ‘TJP’ button that calls ‘imread.m’ MATLAB function. Example images files in the different formats can be found as Additional files: NanoScope (Additional file 1), JPK (Additional file 2), Asylum Research (Additional file 3), ASCII (Additional file 4), ASCII with header (Additional file 5), TIFF (Additional file 6), JPEG (Additional file 7), PNG (Additional file 8). After opening the image a smaller area is selected for the analysis.
The selected area is loaded in the main panel so individual complexes can be measured. Each complex can be labelled with a specific alphanumeric identifier and, after cropping, it will appear in the adjacent window for volume and length analysis. Volume of the particle is calculated as follows: First, the cropped image is used to detect particles by performing a Sobel edge detection operation . Two consecutive convolutions are done for the vertical and horizontal derivatives of the image and the results combined by using the square root of the sum of the squares. Then the operation is repeated with a user-defined threshold that determines the minimum height value to be included in the detection step. Detected regions are filled after opening and closing morphological operations. Regions connected to image borders are suppressed and the final binary mask is used for calculation on the unmodified image. Background height is calculated with the average pixel value excluding the detected particles.
The particle occupying the larger area in the image is surrounded by a red line and selected for calculations. The volume is calculated by adding the volume for each pixel, height value minus the average background as described, multiplied by pixel area. The line tool can measure the distance along a path defined by freehand tracing. The height (intensity) of the pixels along this traced line is plotted in a new window after moving the ‘Profile line’ slider (see below). Average height along the line and standard deviation are shown on top of the graph. Width can be estimated by measuring directly one part of the molecule with the line tool. However, if a more precise measurement is desired, multiple measurements along the traced line are obtained after clicking in the ‘Profile line’ slider. This tool defines the size of lines orthogonal to the freehand traced line. For each of these orthogonal lines the height profile is extracted and fitted to a Gaussian distribution. The STD of the fit at each point is used for estimating the full width at half maximum (FWHM, that equals ~2.3 times the STD) and plotted versus the length of the freehand trace line. Average FWHM along the line and its associated standard deviation are shown on top of the graph. Dimensions of height profile and width along molecules can identify the presence of different components of varying sizes, like proteins bound to DNA. Contour length of molecules can be estimated as described above using the line tool. However, because of the intrinsic flexibility of biomolecules, freehand definition of the contour-length can be difficult. In order to calculate the molecule contour-length in an unbiased manner we included a skeletonization tool. This tool produces the minimum length occupied by the complex by removing pixels on the boundaries without breaking it apart, and can be adjusted by manually changing the threshold intensity (height) and defining a minimum number of pixels to be taken into account in the calculations. Organization of irregular particles can be defined by describing the angle between specified segments based on user-defined points on the skeletonized molecule. All of these measurements can be exported in a Microsoft Excel spreadsheet file by a single click in the main panel. The Microsoft Excel spreadsheet file is created by using the MATLAB script ‘xlwrite.m’ (developed by Alec Zegher) without the necessity of having Microsoft Excel installed. Data for each complex is appended in different rows using the MATLAB script ‘xlsappend.m’ (Brett Schoelson, The MathWorks Inc). An isolated image of the complex under analysis, both as a two-dimensional and as a three-dimensional projection, can be saved in TIFF format by clicking ‘Save image’ button. For displaying purpose, image resolution is artificially increased by 10 fold using cubic interpolation of the four-by-four nearest-neighbour pixels. Color scale in the three-dimensional projection is compatible with red-green color perception deficiencies . When finished with one area a new one can be defined and the analysis continued until the whole image is covered. Subsequently, a new image can be opened and the data will be stored in a new worksheet named with the image file-name in the same Microsoft Excel workbook.
For high-throughput analysis of particle-volume the program provides a tool (SFMedges) where edges of all particles in the whole image are detected as described above. SFMedges can be accessed after calling any of the image formats. The user can define the stringency of the detections by changing the threshold intensity. The volume of every particle in the image is calculated by adding the volume of each pixel in the detected area. Numerical data from all the particles (sum of pixel intensity, solidity or proportion of pixels actually occupied by the molecule in the polygonal region in which can be enclosed, pixel size in nanometers, ratio between minor/major axis of the ellipse enclosing the molecule, volume in cubic nanometers, eccentricity, length of the minor axis, and length of the major axis of the ellipse enclosing the molecule) are exported to an independent Microsoft Excel file so it can be sorted and analysed separately.
Results and discussion
Semi-automatic analysis of DNA and DNA-protein filaments
SFMetrics function was tested using SFM image data of biomolecules typically generated in our laboratory. DNA fragments of 2 kbp were incubated with RAD51 protein, a strand exchange protein that binds DNA and forms stable defined nucleoprotein filaments in the conditions used . Circular dsDNA (pUC19 plasmid), or the nucleoprotein filaments were deposited on freshly cleaved mica, rinsed with water and dried with filtered air . Molecules were imaged in air using a Nanoscope III or IV (Bruker) operating in Tapping Mode™. SFM images were flattened to remove background slope by subtracting a 1st order plane fit with ‘NanoScope Analysis’ software (Bruker) and saved in the original format before opening in SFMetrics. Figure 1 shows a screen-shot of the SFMetrics starting window. After selecting the type of image (JPK, Multimode, Asylum, TIFF/JPEG/PNG, or ASCII) a new window for selecting specific parts of the image is opened (Figure 2). This is useful for large images filled with many objects to analyse. The selected area can be called by typing a number previously assigned by the user in the main window. Specific DNA (Figures 1 and 3) or DNA-protein complexes (Figure 4) are tagged with a number and selected with a square selection tool and the cropped region is displayed in the adjacent window. Volume of the object, in this case DNA or a RAD51 nucleoprotein filament, is calculated after detecting the edges (red contour-line in Figure 4B) of the complex using the sliding threshold tool. The ‘Plot line’ tool allows measurements of distances along a path defined by freehand tracing (red line in Figure 3A) and can be used for determining protein positions on DNA, for example. Height (Figure 3B) and width (Figure 3D) profiles from the line can be acquired by defining the desired width of a line perpendicular to the user-defined path (yellow line in Figure 3A). In order to illustrate this feature, we measured length, width and height of circular DNA molecules using two probes with different radius of curvature. Forty-five (from 15 images) and thirty-six DNA molecules (from 13 images) were measured with AppNano ACT-W probe (nominal radius of curvature 5 nm) and Nanosensors SSS-NCH probe (nominal radius of curvature 2 nm), respectively and hereafter probe A and probe B. Length measured by freehand tracing was 1000 ± 64 (STD) nm (probe A) and 991 ± 46 (STD) nm (probe B). These measurements were significantly (p < 0.05) longer than the skeleton length: 835 ± 64 (STD) nm (probe A) and 847 ± 68 (STD) nm (probe B) but similar between the probes. DNA molecules were 2686 bp in length corresponding to ~892 nm of B-form dsDNA. The different length measured accounted for an overestimation of about 10% of the expected length due to pixel oversampling and user inaccuracy when freehand tracing that did not happen in skeleton length determination. Radius of curvature of the probe, however, is expected to affect significantly the width of the scanned molecules. We measured the FWHM of the DNA molecules in every point along the freehand-traced line (at least 200 data points per DNA molecule) as described above. Figure 5 shows the results obtained with each probe. Probe A produced DNA images with a median FWHM of 6.9 nm (with 6.4 and 7.6 nm as 25th and 75th percentiles respectively), while probe B produced DNA images with a median FWHM of 4.4 nm (with 3.9 and 5.9 nm as 25th and 75th percentiles respectively), significantly thinner (p < 0.05). The average height of the DNA was 0.5 ± 0.08 (STD) nm and 0.3 ± 0.1 (STD), for probe A and B respectively.
The skeleton tool can be used to provide an estimation of the length occupied by the minimum number of pixels representing the object selected. In the case of nucleoprotein filaments presented in Figure 4, the skeleton is the axis of the DNA (Figure 4C). On the skeleton axis, the angle of kinks between different parts of the molecule can be measured with the angle tool (Figure 4C). All the different measurements associated with the selected object are saved in an Excel file with ‘Write data to Excel’ button. A new complex in the same image can be then be analysed and processed iterating as many times as desired. Measurements from the same image will be appended in the same Microsoft Excel file.
High-throughput protein complex analysis
Many protein complexes have irregular shapes making quantification of individual features challenging. The protein complex made of MRE11 and RAD50 (MR) has a characteristic architecture defined from SFM images, some features of which determine its function in binding and tethering DNA molecules for repair of double-strand breaks . Stoichiometry of MR has been defined by a combination of volume analysis and identification of long coiled-coils protruding from RAD50 as seen by SFM. In order to test the high-throughput potential of the software, we used images of the MR complex. The purified protein complex was deposited onto freshly cleavage mica, (as described in ref ). Molecules were imaged as described in the previous section. Figure 6A shows a screen-shot of the module for high-throughput analysis, called by pressing ‘SFMedges’ in the panel after opening the image (Figure 2). In this case, the edge detection algorithm works on the whole image detecting all particles (middle panel in Figure 6A and zoom in Figure 6B). The threshold stringency for selecting the particles is defined by the user ignoring edges below the threshold. Because the edge detection algorithm operates on the differences between neighbouring pixels using an image gradient, rather than on the pixel values directly, molecule detection is less sensitive to noise compared to conventional intensity thresholding (Figure 6C). Volume data for the detected particles is stored in a file and its distribution displayed in a user-adjustable histogram. This histogram can reveal if a protein preparation is mono-disperse or not, for example. However, due to tip-sample convolution effect, absolute volume determination by SFM requires calibration with known standards. If several images have been collected in automatic mode and stored in the same folder, volume analysis can be performed in batch after selecting the ‘Edge factor’ with one of the images, and by clicking in the ‘Volume whole folder’ button. One single image can be analysed by clicking ‘Volume this image’. Volume distribution can be used for identifying different populations of molecules in the scanned area. Maximum and minimum volume to be analysed, together with the number of bins in the histogram, can be adjusted by typing the desired numbers.
Comparison with other tools
Proper calibration of SFM images is of the utmost importance to recover accurate data from the recorded images. Each manufacture uses a different file format for storing the pixel size and height. Although pixel size calibration is straightforward after knowing the scan size, pixel height calibration is not so obvious. Differences in height are represented in the images by differences in pixel intensity stored usually as 16 bit values, but also as 8 bit or 32 bit, and as integer or real numbers. The information that makes the file readable is attached in the file as text or binary data. These differences make it difficult to open SFM images in software other than that provided by the manufacturer. Thus any software for analysis of SFM images has to be able to extract image calibration information for the data files.
The software presented here shares functionalities with Image SXM, an ImageJ derivative that runs as freeware in Mac OS operation systems. A detailed protocol for measuring protein volume from SFM images using Image SXM has been published . SFMetrics can perform similar calculations in a straightforward manner in a Windows platform using the stand-alone version (also Linux or OSX with MATLAB installed using the scripts) with the added benefit of integrating a range of metrology tools. Measurement of distances point to point is a common characteristic in the available programs, however a tool to trace paths freehand offers more capabilities. High-throughput analysis of the data, such as position along a path and height profiles along a path, with the existing programs is challenging and time consuming. The edge detection tool, easily adjustable by the user, makes SFMetrics a powerful tool for fast and reliable analysis of biomolecules in SFM images. It accurately defines the area to be analysed occupied by very irregular objects typical of complex biomolecular assemblies. Analysis of SFM data has typically employed custom written routines developed in each laboratory, using different procedures for determining the volume or other dimensions of individual particles [9-15].
Our software is intended for a broad spectrum of potential users, although it has been developed specifically for the analysis of SFM images of biomolecules, it could also be applied to any objects or image features that are irregular and variable. It does not require programming skills but can be adjusted for different purposes with minimum modifications in MATLAB, a common software environment used in image and matrix analysis.
SFMetrics is a semi-automatic analysis tool capable of measuring several geometrical properties (length, volume and angles) from DNA and protein complexes. It is assembled in a single user interface provided as a MATLAB script and as a stand-alone application running in Windows. We have developed a versatile tool to analyse irregular objects applying user-adjusted thresholds. Multiple features of the same complex can be linked in a tabulated form, so that the user does not have to keep track of all the measurements and link them for analysis manually. SFMetrics enables semi-automatic and high-throughput analysis of SFM data, specifically aimed to DNA and proteins, that can be easily adapted to other samples.
Availability and requirements
Project name: SFMetrics
Project home page: http://cluster15.erasmusmc.nl/TIRF-SFM-scripts
Operating system: Windows (64bit version) for the stand-alone version
Programming environment: MATLAB R2013b (64bit version)
Requirements: If used under MATLAB: MATLAB 2013b or newer, Curve Fitting and Image Processing Toolboxes are required. If used as a stand-alone application, MATLAB Component Runtime (MCR) is required (available to download with the software package).
License: Free for non-commercial use.
Tag image file format
Scanning force microscopy
Full width at half maximum
Ristic D, Sanchez H, Wyman C. Sample preparation for SFM imaging of DNA, proteins, and DNA-protein complexes. Meth mol biol. 2011;783:213–31.
Schneider CA, Rasband WS, Eliceiri KW. NIH Image to ImageJ: 25 years of image analysis. Nat Meth. 2012;9:671–5.
Horcas I, Fernandez R, Gomez-Rodriguez JM, Colchero J, Gomez-Herrero J, Baro AM. WSXM: a software for scanning probe microscopy and a tool for nanotechnology. Rev Sci Instrum. 2007;78:013705.
Necas D, Klapetek P. Gwyddion: an open-source software for SPM data analysis. Cent Eur J Phys. 2012;10:181–8.
Sobel I, Feldman G. An Isotropic 3x3 Image Gradient Operator. Presentation at Stanford AI Project. 1968.
Geissbuehler M, Lasser T. How to display data by color schemes compatible with red-green color perception deficiencies. Opt Express. 2013;21:9862–74.
Ristic D, Modesti M, van der Heijden T, van Noort J, Dekker C, Kanaar R, et al. Human Rad51 filaments on double- and single-stranded DNA: correlating regular and irregular forms with recombination function. Nucleic Acids Res. 2005;33:3292–302.
Kinoshita E, van der Linden E, Sanchez H, Wyman C. RAD50, an SMC family member with multiple roles in DNA break repair: how does ATP affect function? Chromosome Res. 2009;17:277–88.
van der Linden E, Sanchez H, Kinoshita E, Kanaar R, Wyman C. RAD50 and NBS1 form a stable complex functional in DNA binding and tethering. Nucleic Acids Res. 2009;37:1580–8.
Ratcliff GC, Erie DA. A novel single-molecule study to determine protein–protein association constants. J Am Chem Soc. 2001;123:5632–5.
Rivetti C, Guthold M, Bustamante C. Scanning force microscopy of DNA deposited onto mica: equilibration versus kinetic trapping studied by statistical polymer chain analysis. J Mol Biol. 1996;264:919–32.
Rivetti C, Codeluppi S. Accurate length determination of DNA molecules visualized by atomic force microscopy: evidence for a partial B- to A-form transition on mica. Ultramicroscopy. 2001;87:55–66.
van Noort J, van Der Heijden T, de Jager M, Wyman C, Kanaar R, Dekker C. The coiled-coil of the human Rad50 DNA repair protein contains specific segments of increased flexibility. Proc Natl Acad Sci U S A. 2003;100:7581–6.
Nettikadan S, Tokumasu F, Takeyasu K. Quantitative analysis of the transcription factor AP2 binding to DNA by atomic force microscopy. Biochem Biophys Res Commun. 1996;226:645–9.
Fuentes-Perez ME, Dillingham MS, Moreno-Herrero F. AFM volumetric methods for the characterization of proteins and nucleic acids. Methods. 2013;60:113–21.
This work was supported by a Marie Curie Reintegration Grant [FP7-276898 to H.S.]; and grants from the CancerGenomiCs.nl (NWO gravitation), The Dutch Technology Foundation STW, and the NanoNextNL consortium to CW. We thank E. Kinoshita for providing the SFM image in Figure 3; S. Yoshimura and S. Otsuka (Kyoto university) for figure in Additional file 3; D. Ristic and M. Grosbart for suggestions and testing the software, and S. van Rossum-Fikkert for technical assistance and comments on the manuscript.
The authors declare that they have no competing interests.
HS and CW conceived the idea and wrote the manuscript. HS designed and programmed the software. Both authors read and approved the final manuscript.
SFM example image of DNA plasmid in NanoScope format.
SFM example image of DNA plasmid in JPK format.
SFM example image of nuclear membrane in Asylum Research format. Image courtesy of S Yoshimura and S. Otsuka (Kyoto University).
SFM example image of DNA plasmid in ASCII format.
SFM example image of DNA plasmid in ASCII with header format.
SFM example image of DNA plasmid in TIFF format.
SFM example image of DNA plasmid in JPEG format.
SFM example image of DNA plasmid in PNG format.
About this article
Cite this article
Sánchez, H., Wyman, C. SFMetrics: an analysis tool for scanning force microscopy images of biomolecules. BMC Bioinformatics 16, 27 (2015). https://doi.org/10.1186/s12859-015-0457-8