Research

The Collaborative Potential of Github for AFM

Ellie Bradshaw

Atomic force microscopy (AFM) is a brilliant tool for research used by scientists across numerous disciplines. Undoubtedly, the sharing of ideas and protocols has the potential to further research significantly.

But what’s the best way to do this? We’ve recently caught up with several researchers to discuss their reasons for sharing research on the platform GitHub and whether it has any benefits for the AFM Community.

What is GitHub?

GitHub has been described as a place where ‘the world builds software’ and is commonly used to host open-source projects. Over 73+ million developers and 4+ million organisations use the platform which facilitates version control and issue tracking aspects of software development. GitHub allows anyone to browse and download data from public repositories, but users must be registered to contribute content.

 

A Scientist’s Perspective

Dr Jamie Goodchild

One of the most successful nanoscale characterisation techniques of the last 10-20 years has been Cryo-Electron Microscopy. As well as amazing technological advances and constant pushing the boundaries, another key to its success is the agreed file formats and data analysis that everyone uses.

AFM struggles because every AFM spits out a different file format and most researchers and labs write their own codes and software for analysis. In many ways this is good, as it is giving training and practice to coders who can analyse images.

However, it means there are many people working on the same problems over and over, instead of focusing on what the analysis shows i.e., hopefully exciting discoveries.

 

Left to right: Dr Rajiv Giridharagopal, Dr George Heath and Dr Alice Pyne.

 

To better understand the collaborative potential of GitHub for AFM, we got in contact with Dr Rajiv Giridharagopal (University of Washington), Dr George Heath (University of Leeds) and Dr Alice Pyne (University of Sheffield) to discuss their thoughts.

 

Tell us about your AFM code/software you shared on GitHub?

Raj: Our lab (David Ginger's lab: http://depts.washington.edu/gingerlb/) uses a lot of custom code written in Igor Pro for controlling our AFMs (MFP3D or Cypher AFMs from Asylum Research). One of the advantages of those AFMs is that there are lots of available low-level interface commands.

For example, you can manually move the tip or set custom feedback loops. So, for my work especially, we write a lot of routines to enable custom imaging. Our workflow for this is fairly atypical in AFM labs, so we get lots of requests for this code. It was publicly available before, but it was a little tricky to find (https://github.com/rajgiriUW/AFMSoftware).

To be honest, I have to do a lot of work to make this more user-friendly since it probably won't work in other labs as is! But hopefully it gives others an idea of what you can do to manipulate the AFM.

George: At the moment I have a few MATLAB codes to analyse HS-AFM Line scanning data, analyse fibrils/polymers in AFM images and a simple particle analysis code. I’m hoping to share many more tools in the near future: https://github.com/George-R-Heath.

Alice: Our Software TopoStats is part of a larger movement to promote shared analytical infrastructure in AFM (www.github.com/AFM-SPM).

TopoStats is a foundational tool for AFM, written in Python, with the aim of enabling all AFM researchers to automate their image processing and obtain quantitative data from their images, without the need for user input.

TopoStats carries out essential data handling, processing, and cleaning steps, which enables AFM to feed into downstream software designed for other formats of image data.

 

What benefits did you find from using GitHub to share your AFM code/software?

Raj: I personally think science is a lot easier when you don't have to reinvent the wheel. It's great to see what others do so you can think outside the box as well. For example, there's another package I sometimes contribute to but is mostly run by Oak Ridge National Lab called Pycroscopy (https://github.com/pycroscopy) that helps handle the data-processing side of microscopy. 

George: I find it a simple way to link potential users to code used in publications. Whilst code can be added to supplementary information, GitHub has the advantage that the code can be updated as needed. Personally, I often find errors or bugs in my own code when trying to use it in a new way so being able to update codes easily is great.

Additionally, code doesn’t need to be linked to a specific paper, users can share anything that others might find useful on GitHub. As a user of other people’s code (not just for AFM analysis) I have already benefited and saved huge amounts of time from download code from GitHub. 

Alice: By hosting our software on GitHub we have been able to share our software with researchers from the UK and beyond, enabling those researchers to contribute to the code, find bugs and suggest or implement features they’d like to use in their own image processing pipelines.

We are currently undergoing a major refactoring of TopoStats including adding automated testing and documentation to make this software easier for the community to use and contribute to. This is happening as the result of a KE grant from the University of Sheffield and has allowed us to bring in Research Software Engineers to work closely with our team. This has been made possible using “GitHub Actions” and will result in a fast robust tool for the wider community.

We hope that we will save all researchers in the field a lot of time currently spent processing their images and that TopoStats will help us move towards a place where no one presents images with image processing artefacts!

 

Why do you think others should use GitHub for AFM research?

Raj: I don't know if GitHub specifically is important so much as just sharing code is important, so others can replicate the work. I think especially as more and more AFM work involves machine learning and more complex analyses, reproducing the results will be very important.

George: Although a lot of code is written to analyse very specific AFM problems, there is often significant overlap between other people's work who may be trying to perform similar analysis who would benefit from access to that code.

Researchers that may not have the time or experience to write a completely new code could use and possibly adapt shared code to solve their own problems, gain completely new insight or automate lengthy analysis.

Automated image processing and analysis is becoming increasingly important as we move to higher data acquisition rates through High-Speed imaging so sharing code will be important in this aspect. 

Overall increased sharing of code will help advance the AFM field faster and better, by reducing the barrier to more complex analysis and enabling us to build upon each other’s work all whilst increasing links between the community. 

Alice: Software is increasingly being seen as a first-class research output equivalent to papers and datasets. Sharing research software via GitHub or equivalents e.g., Gitlab, package repositories such as PyPI and sites like Zenodo or Figshare enables researchers to build on and reproduce each other's work. This accelerates research and delivers more value to funders.

I hope that the AFM field can work together to develop shared software that advances the field, and that all can contribute to and think GitHub is a brilliant way to do this, for example at www.github.com/AFM-SPM.

 

As is evident, GitHub has great potential for sharing code, saving time, and fostering the AFM community. What are your thoughts? Do you use code from GitHub or perhaps contribute to it yourself? Share your comments with us at community@nunano.com.

 

With thanks to Dr Rajiv Giridharagopal, Dr George Heath, Dr Alice Pyne, and Dr Jamie Goodchild for their contributions to this blog.


SIGN UP TO OUR NEWSLETTER