Chapter 2 Instrumentation and Software

2.1 Instrumentation

All of the images used in this thesis were acquired on a Leica SP8 confocal microscope4 equipped with hybrid detectors (section 1.2.1.3) in photon counting mode.

2.2 Software programs, languages and tools

2.2.1 C++

C++ (Stroustrup 2013) is a general-purpose programming language optimized for performance (speed), efficiency (with use of computer resources) and flexibility. I used it for its speed, since many of the algorithms that I developed were quite computationally intensive and hence speed was an important consideration.

2.2.2 R

R (R Core Team 2016) is a programming language and free software environment for statistical computing and graphics. I use R primarily as a wrapper for my C++ code to make my algorithms more user-friendly. R is best used with the RStudio integrated development environment.5

2.2.3 ImageJ

ImageJ (Rueden et al. 2017) is an open source image processing program designed for scientific multidimensional images. It is the preferred image viewing and analysis software in the community. I have written my software in C++ and R because they are easier for developers, but I still intend to translate my image-related algorithms ImageJ plugins. ImageJ is best used via the FIJI (Schindelin et al. 2012) distribution.

2.2.4 Git and GitHub

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.6 GitHub is a web-based hosting service for version control using Git. All of the computer code used during my thesis can be found on my GitHub at https://github.com/rorynolan. The vast majority of my time during my thesis was spent writing code so this GitHub account is the best record of the work that I have done.

2.3 My software packages

2.3.1 filesstrings

filesstrings is an R package providing convenient functions for moving files, deleting directories, and a variety of string operations that facilitate manipulating file names and extracting information from strings. The motivation for making this package was to facilitate the use of file names for metadata. This is very common in microscopy, e.g. a file name like well1_cell1_before_drug_addition.tif is often seen. Using file names for metadata like this is a good idea, however if the naming or the extraction of data from these names is inconsistent, analysis becomes a nightmare and less reproducible. filesstrings is provides a consistent means of working with such file names. This package was peer reviewed and published (Nolan and Padilla-Parra 2017b). It gets 3,000 downloads per month which amounts to 80,000 since it was first released.

2.3.2 exampletestr

Definition 2.1 Unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.

Unit testing is a tool to verify that software is performing as intended. It is a great way to discover bugs in software. exampletestr is an R package which makes it easier for R package developers to write unit tests for their packages. It helped me to eradicate many bugs in all of my packages. Interestingly, exampletestr was used to unit test and eradicate bugs in itself! This package was peer reviewed and published in 2017.(Nolan and Padilla-Parra 2017a) It gets 600 downloads per month which amounts to 20,000 since it was first released.

2.3.3 ijtiff

An R package for general purpose tagged image file format (TIFF) input and output (I/O). This is currently the only such package with read and write support for TIFF files with floating point (real-numbered) pixels, and the only package that can correctly import TIFF files that were saved from ImageJ (Rueden et al. 2017). R has millions of users worldwide so this TIFF I/O capability is a basic need for masses of people. ijtiff gets 800 downloads per month which amounts to 20,000 since it was first released.

This package is part of the rOpenSci project. rOpenSci is a non-profit initiative founded to make scientific data retrieval reproducible.7 This package was peer reviewed and published (Nolan and Padilla-Parra 2018).

2.3.4 autothresholdr

autothresholdr provides the ImageJ (Rueden et al. 2017) Auto Threshold plugin (Landini et al. 2016) functionality to R users. It gets 700 downloads per month which amounts to 20,000 since it was first released.

2.3.5 detrendr

detrendr is an R package for detrending images (correcting for photobleaching). It provides all detrending algorithms mentioned in section 3. The detrending is done in C++ in the background for speed but it is wrapped in an R package for ease of use. It gets 500 downloads per month which amounts to 10,000 since it was first released.

2.3.6 nandb

nandb is an R package for number and brightness analysis. This was published along with a paper about detrending for number and brightness (Nolan, Alvarez, et al. 2017). It gets 500 downloads per month which amounts to 10,000 since it was first released.

2.3.7 brownded

brownded is an R software package (https://github.com/rorynolan/brownded) for simulating bounded Brownian motion in any number of dimensions, where bounded Brownian motion is Brownian motion in an \(d\)-dimensional box where the particles collide elastically (without loss of energy) within the boundaries of the box. brownded allows specification of the number of dimensions, the number of particles, the size of the box and the diffusion coefficient of the particles.

brownded also facilitates the simulation of images created from fluorescent particles undergoing bounded Brownian motion. It allows specification of the time at which each image should be taken, the pixel size and the brightness of the particles. Each fluorescent particle contributes photon counts to its pixel of residence at that time according to a Poisson process.

Finally, brownded facilitates the synthetic bleaching of fluorescent particles, so bleaching can be investigated with images produced with brownded.

References

Landini, G., D.A. Randell, S. Fouad, and A. Galton. 2016. “Automatic Thresholding from the Gradients of Region Boundaries.” Journal of Microscopy 265 (2). Wiley: 185–95. doi:10.1111/jmi.12474.

Nolan, Rory, L Alvarez, Jonathan Elegheert, Maro Iliopoulou, G Maria Jakobsdottir, Marina Rodriguez-Muñoz, A Radu Aricescu, and Sergi Padilla Parra. 2017. “Nandb—number and Brightness in R with a Novel Automatic Detrending Algorithm.” Bioinformatics 33 (21). Oxford University Press: 3508–10. doi:10.1093/bioinformatics/btx434.

Nolan, Rory, and Sergi Padilla-Parra. 2017a. “exampletestr - an Easy Start to Unit Testing R Packages.” Wellcome Open Research 2 (June). F1000 Research, Ltd.: 31. doi:10.12688/wellcomeopenres.11635.2.

Nolan, Rory, and Sergi Padilla-Parra. 2017b. “filesstrings: An R Package for File and String Manipulation.” The Journal of Open Source Software 2 (14). The Open Journal: 260. doi:10.21105/joss.00260.

Nolan, Rory, and Sergi Padilla-Parra. 2018. “ijtiff: An R Package Providing TIFF I/O for ImageJ Users.” Journal of Open Source Software 3 (23). The Open Journal: 633. doi:10.21105/joss.00633.

R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.

Rueden, C. T., J. Schindelin, M. C. Hiner, B. E. DeZonia, A. E. Walter, E. T. Arena, and K. W. Eliceiri. 2017. “ImageJ2: ImageJ for the next generation of scientific image data.” BMC Bioinformatics 18 (1): 529. doi:10.1186/s12859-017-1934-z.

Schindelin, J., I. Arganda-Carreras, E. Frise, V. Kaynig, M. Longair, T. Pietzsch, S. Preibisch, et al. 2012. “Fiji: an open-source platform for biological-image analysis.” Nat. Methods 9 (7): 676–82. doi:10.1038/nmeth.2019.

Stroustrup, Bjarne. 2013. The C++ Programming Language. 4th ed. Addison-Wesley Professional.