Nature Microbiology 2, 16222 (2016); published 5 December 2016; corrected 22 December 2016

The title of this Article has been modified by replacing ‘pili’ with the singular version of the word, ‘pilus’. In addition, in the version of the Article originally published, two colour scale bars relating to Figs 4a,b and 5a–c were mislabelled. These have now been corrected in all versions of the Article so that the scale bars are labelled as: ‘Hydrophilicity’.