<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "http://jats.nlm.nih.gov/publishing/1.3/JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xml:lang="en" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<processing-meta>
<custom-meta-group content-type="composition">
<custom-meta specific-use="newgen" xlink:href="https://www.newgen.co/">
<meta-name>Composition Vendor</meta-name>
<meta-value>Newgen KnowledgeWorks (P) Ltd.</meta-value>
</custom-meta>
</custom-meta-group>
</processing-meta>
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">PLoS Comput Biol</journal-id>
<journal-id journal-id-type="publisher-id">plos</journal-id>
<journal-id journal-id-type="pmc">ploscomp</journal-id>
<journal-title-group>
<journal-title>PLOS Computational Biology</journal-title>
</journal-title-group>
<issn pub-type="ppub">1553-734X</issn>
<issn pub-type="epub">1553-7358</issn>
<publisher>
<publisher-name>Public Library of Science</publisher-name>
<publisher-loc>San Francisco, CA USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.1371/journal.pcbi.1013864</article-id>
<article-id pub-id-type="publisher-id">PCOMPBIOL-D-25-01631</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Software</subject>
</subj-group>
<subj-group subj-group-type="Discipline-v3">
<subject>Biology and life sciences</subject><subj-group><subject>Cell biology</subject><subj-group><subject>Cell motility</subject><subj-group><subject>Cell migration</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Biology and life sciences</subject><subj-group><subject>Developmental biology</subject><subj-group><subject>Cell migration</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Computer and information sciences</subject><subj-group><subject>Software engineering</subject><subj-group><subject>Computer software</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Engineering and technology</subject><subj-group><subject>Software engineering</subject><subj-group><subject>Computer software</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Physical sciences</subject><subj-group><subject>Mathematics</subject><subj-group><subject>Probability theory</subject><subj-group><subject>Markov models</subject><subj-group><subject>Hidden Markov models</subject></subj-group></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Biology and life sciences</subject><subj-group><subject>Cell biology</subject><subj-group><subject>Cell physiology</subject><subj-group><subject>Cell polarity</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Research and analysis methods</subject><subj-group><subject>Mathematical and statistical techniques</subject><subj-group><subject>Cluster analysis</subject><subj-group><subject>Hierarchical clustering</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Physical sciences</subject><subj-group><subject>Mathematics</subject><subj-group><subject>Algebra</subject><subj-group><subject>Linear algebra</subject><subj-group><subject>Eigenvectors</subject></subj-group></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Physical sciences</subject><subj-group><subject>Mathematics</subject><subj-group><subject>Applied mathematics</subject><subj-group><subject>Algorithms</subject><subj-group><subject>Clustering algorithms</subject></subj-group></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Research and analysis methods</subject><subj-group><subject>Simulation and modeling</subject><subj-group><subject>Algorithms</subject><subj-group><subject>Clustering algorithms</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Research and analysis methods</subject><subj-group><subject>Database and informatics methods</subject><subj-group><subject>Bioinformatics</subject><subj-group><subject>Sequence analysis</subject><subj-group><subject>Sequence alignment</subject></subj-group></subj-group></subj-group></subj-group></subj-group></article-categories>
<title-group>
<article-title>ShapeSpaceExplorer: Analysis of morphological transitions in migrating cells using similarity-based shape space mapping</article-title>
<alt-title alt-title-type="running-head">ShapeSpaceExplorer</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Jefferyes</surname>
<given-names>Samuel D. R.</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role content-type="http://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role content-type="http://credit.niso.org/contributor-roles/software/">Software</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – original draft</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff002"><sup>2</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Gostner</surname>
<given-names>Roswitha</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/software/">Software</role>
<role content-type="http://credit.niso.org/contributor-roles/validation/">Validation</role>
<role content-type="http://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="fn" rid="currentaff001"><sup>¤a</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Cooper</surname>
<given-names>Laura</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/resources/">Resources</role>
<role content-type="http://credit.niso.org/contributor-roles/software/">Software</role>
<role content-type="http://credit.niso.org/contributor-roles/validation/">Validation</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – original draft</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing – review &amp; editing</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Abdelsamea</surname>
<given-names>Mohammed M.</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role content-type="http://credit.niso.org/contributor-roles/software/">Software</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="fn" rid="currentaff002"><sup>¤b</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Straube</surname>
<given-names>Elly</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="fn" rid="currentaff003"><sup>¤c</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Rajpoot</surname>
<given-names>Nasir</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<xref ref-type="aff" rid="aff003"><sup>3</sup></xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0001-8634-7168</contrib-id>
<name name-style="western">
<surname>Epstein</surname>
<given-names>David B. A.</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing – review &amp; editing</role>
<xref ref-type="aff" rid="aff004"><sup>4</sup></xref>
</contrib>
<contrib contrib-type="author" corresp="yes" xlink:type="simple">
<contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0003-2067-9041</contrib-id>
<name name-style="western">
<surname>Straube</surname>
<given-names>Anne</given-names>
</name>
<role content-type="http://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
<role content-type="http://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role content-type="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role content-type="http://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role content-type="http://credit.niso.org/contributor-roles/resources/">Resources</role>
<role content-type="http://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role content-type="http://credit.niso.org/contributor-roles/validation/">Validation</role>
<role content-type="http://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing – original draft</role>
<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing – review &amp; editing</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="corresp" rid="cor001">*</xref>
</contrib>
</contrib-group>
<aff id="aff001"><label>1</label> <addr-line>Centre for Mechanochemical Cell Biology and Biomedical Sciences, Warwick Medical School, University of Warwick, Coventry, United Kingdom</addr-line></aff>
<aff id="aff002"><label>2</label> <addr-line>Systems Biology Doctoral Training Centre, University of Warwick, Coventry, United Kingdom</addr-line></aff>
<aff id="aff003"><label>3</label> <addr-line>Department of Computer Science, University of Warwick, Coventry, United Kingdom</addr-line></aff>
<aff id="aff004"><label>4</label> <addr-line>Mathematics Institute, University of Warwick, Coventry, United Kingdom</addr-line></aff>
<contrib-group>
<contrib contrib-type="editor" xlink:type="simple">
<name name-style="western">
<surname>Liu</surname>
<given-names>Jian</given-names>
</name>
<role>Editor</role>
<xref ref-type="aff" rid="edit1"/></contrib>
</contrib-group>
<aff id="edit1"><addr-line>JHU, UNITED STATES OF AMERICA</addr-line></aff>
<author-notes>
<fn fn-type="current-aff" id="currentaff001">
<label>¤a</label>
<p>Current address: Carl Zeiss Digital Innovation GmbH, Munich, Germany</p>
</fn>
<fn fn-type="current-aff" id="currentaff002">
<label>¤b</label>
<p>Current address: Department of Computer Science, Faculty of Environment, Science and Economy, University of Exeter, Streatham Campus, Exeter, United Kingdom</p>
</fn>
<fn fn-type="current-aff" id="currentaff003">
<label>¤c</label>
<p>Current address: Institute of Natural Materials Technology, Dresden University of Technology, Dresden, Germany</p>
</fn>
<fn fn-type="conflict" id="coi001">
<p>The authors have declared that no competing interests exist.</p>
</fn>
<corresp id="cor001">* E-mail: <email xlink:type="simple">anne@mechanochemistry.org</email></corresp>
</author-notes>
<pub-date pub-type="epub"><day>5</day><month>1</month><year>2026</year></pub-date>
<pub-date pub-type="collection"><month>1</month><year>2026</year></pub-date>
<volume>22</volume>
<issue>1</issue>
<elocation-id>e1013864</elocation-id>
<history>
<date date-type="received"><day>12</day><month>8</month><year>2025</year></date>
<date date-type="accepted"><day>22</day><month>12</month><year>2025</year></date>
</history>
<permissions>
<copyright-year>2026</copyright-year>
<copyright-holder>Jefferyes et al</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p></license>
</permissions>
<self-uri content-type="pdf" xlink:href="info:doi/10.1371/journal.pcbi.1013864"/>
<abstract>
<p>Here we describe the development of ShapeSpaceExplorer, an interactive software for the extraction, visualisation and analysis of complex 2D shape series. We also demonstrate its application to the analysis of cell morphology changes during cell migration. Cell migration is essential for many physiological and pathological processes. Intracellular force generation and transmission of these forces to extracellular structures or neighbouring cells drives cell migration. The emergent property of the processes driving cell migration is a change in cell shape. We describe a machine learning approach to understand the relationship of cell shape dynamics and cell migration behaviour. Our algorithm analyses cell shape from time-lapse images and learns the intrinsic low-dimensional structure of cell shape space. We use the resultant shape space map to visualise differences in cell shape distribution following perturbation experiments and to analyse the quantitative relationships between shape and migration behaviour. The core of our algorithm is a new, rapid, and landmark-free shape difference measure that allows unbiased analysis of the widely varying morphologies exhibited by migrating mesenchymal cells. We used our method to predict cell turning from dynamic cell shape information. ShapeSpaceExplorer can be applied widely to visualise and analyse cell morphology changes during development, the cell cycle and stress response, but also to the outlines of clusters, tissues and inanimate objects.</p>
</abstract>
<funding-group>
<award-group id="award001">
<funding-source><institution>Warwick Systems Biology Doctoral Training Centre (EPSRC/BBSRC))</institution>
</funding-source><principal-award-recipient><name name-style="western">
<surname>Jefferyes</surname><given-names>Samuel D. R.</given-names></name></principal-award-recipient></award-group>
<award-group id="award002">
<funding-source><institution>Institute of Advanced Study, University of Warwick</institution>
</funding-source><principal-award-recipient><name name-style="western">
<surname>Gostner</surname><given-names>Roswitha</given-names></name></principal-award-recipient></award-group>
<award-group id="award003">
<funding-source>
<institution-wrap>
<institution-id institution-id-type="funder-id">http://dx.doi.org/10.13039/501100001255</institution-id>
<institution>Lister Institute of Preventive Medicine</institution>
</institution-wrap>
</funding-source><award-id>Research Prize 2013</award-id>
<principal-award-recipient><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0003-2067-9041</contrib-id><name name-style="western">
<surname>Straube</surname><given-names>Anne</given-names></name></principal-award-recipient></award-group>
<award-group id="award004">
<funding-source>
<institution-wrap>
<institution-id institution-id-type="funder-id">http://dx.doi.org/10.13039/100010269</institution-id>
<institution>Wellcome Trust</institution>
</institution-wrap>
</funding-source><award-id>224563/Z/21/Z</award-id>
<principal-award-recipient><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0003-2067-9041</contrib-id><name name-style="western">
<surname>Straube</surname><given-names>Anne</given-names></name></principal-award-recipient></award-group>
<funding-statement>This work was supported by a PhD studentship in the Warwick Systems Biology Doctoral Training Centre supported by BBSRC and EPSRC (to SDRJ), a postdoctoral fellowship from the Institute of Advanced Study, University of Warwick (to RG), a Lister Institute of Preventive Medicine Research Prize (to AS, funding the salary of MMA and a Lister summer studentship of ES), and a Wellcome Investigator Award in Science (224563/Z/21/Z to AS). Funder details: Biotechnology and Biological Sciences Research Council (BBSRC): <ext-link ext-link-type="uri" xlink:href="https://www.ukri.org/councils/bbsrc/" xlink:type="simple">https://www.ukri.org/councils/bbsrc/</ext-link>. Engineering and Physical Sciences Research Council (EPSRC): <ext-link ext-link-type="uri" xlink:href="https://www.ukri.org/councils/epsrc/" xlink:type="simple">https://www.ukri.org/councils/epsrc/</ext-link>. Lister Institute of Preventive Medicine: <ext-link ext-link-type="uri" xlink:href="https://lister-institute.org.uk/" xlink:type="simple">https://lister-institute.org.uk/</ext-link>. Wellcome Trust: <ext-link ext-link-type="uri" xlink:href="https://wellcome.org/" xlink:type="simple">https://wellcome.org/</ext-link>. Institute of Advanced Study, University of Warwick: <ext-link ext-link-type="uri" xlink:href="https://warwick.ac.uk/fac/cross_fac/ias/" xlink:type="simple">https://warwick.ac.uk/fac/cross_fac/ias/</ext-link>. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.</funding-statement>
</funding-group>
<counts>
<fig-count count="7"/>
<table-count count="1"/>
<page-count count="16"/>
</counts>
<custom-meta-group>
<custom-meta id="data-availability">
<meta-name>Data Availability</meta-name>
<meta-value>The code and documentation is available at <ext-link ext-link-type="uri" xlink:href="https://github.com/cmcb-warwick/ShapeSpaceExplorer" xlink:type="simple">https://github.com/cmcb-warwick/ShapeSpaceExplorer</ext-link> and in the Supporting information files. The raw image data used for this study are available at DOI 10.5281/zenodo.14998398 and the processed data are available at DOI 10.5281/zenodo.14999395.</meta-value>
</custom-meta>
<custom-meta>
<meta-name>PLOS Publication Stage</meta-name>
<meta-value>vor-update-to-uncorrected-proof</meta-value>
</custom-meta>
<custom-meta>
<meta-name>Publication Update</meta-name>
<meta-value>2026-01-12</meta-value>
</custom-meta>
</custom-meta-group>
</article-meta>
</front>
<body>
<sec id="sec001" sec-type="intro">
<title>Introduction</title>
<p>Conventional analysis of cell morphology involves the measurement of shape features such as length, area, circularity and symmetry. Such an analysis is particularly efficient to determine how a specific property of cell shape relates to a specific cellular function. For example, cell length has been found to be an informative feature in the analysis of the <italic>S. pombe</italic> life cycle [<xref ref-type="bibr" rid="pcbi.1013864.ref001">1</xref>]. Simple shape features can also be used in dynamic models. We have previously described that although the maximum length of cell tails in human epithelial cells remains unchanged, the lifetime of individual tails decreases dramatically when trailing cell adhesion is reduced [<xref ref-type="bibr" rid="pcbi.1013864.ref002">2</xref>]. To quantify such behaviour usually requires prior knowledge of those features that best describe the different shapes in the dataset. Alternatively, a large number of shape features can be computed and principal component analysis (PCA) or neural network analysis performed to reduce the dimensionality of the dataset [<xref ref-type="bibr" rid="pcbi.1013864.ref003">3</xref>,<xref ref-type="bibr" rid="pcbi.1013864.ref004">4</xref>]. However, there are limitations to the suitability of PCA if the investigated data structure is not linear. In addition, feature-based measurements have other problems relating to the fact that objects can have similar features whilst being visually different. Other methods that have been implemented are selecting modes of shape variability using principal component analysis [<xref ref-type="bibr" rid="pcbi.1013864.ref005">5</xref>], spherical harmonics [<xref ref-type="bibr" rid="pcbi.1013864.ref006">6</xref>], signed morphomigrational angle [<xref ref-type="bibr" rid="pcbi.1013864.ref007">7</xref>], <italic>InShaDe</italic> based on discrete curvature along closed, resampled contours [<xref ref-type="bibr" rid="pcbi.1013864.ref008">8</xref>] and lobe contribution elliptical Fourier analysis (LOCO-EFA) [<xref ref-type="bibr" rid="pcbi.1013864.ref009">9</xref>].</p>
<p>Mesenchymal cells present a challenging problem in computer vision as their widely varying morphologies are difficult to model, and clearly their shape dynamics are integral for their function and migratory behaviour. In this paper, we develop a quantitative representation of the shape distribution of migrating cells independently of shape descriptors by computing a similarity score for every pair of shapes in the dataset and employ the Diffusion Maps technique [<xref ref-type="bibr" rid="pcbi.1013864.ref010">10</xref>] to generate a geometric description of the cell shape space. The trajectories of individual cells on the resulting shape space map are then explored to quantify cell shape changes and correlate cell shape dynamics with migratory behaviour. We find that analysis of shape dynamics alone permits the prediction of directional changes during cell migration.</p>
<p>This method is implemented in MATLAB with graphical user interfaces to allow users to intuitively analyse and explore their data. ShapeSpaceExplorer includes tools that allow users to visualise, classify and interact with the results.</p>
</sec>
<sec id="sec002" sec-type="materials|methods">
<title>Design and implementation</title>
<sec id="sec003">
<title>Shape space creation</title>
<p>The classic approach to surveying and mapping of land is to measure the distance between objects locally and plot these to scale. Similarly to this, we construct a map of shape space, i.e. a geometric representation of all cell shapes in a dataset, by determining the difference between the shapes in the dataset and learning the local data structure. In the resulting shape space map, points that are close represent shapes that are similar, and points that are far apart represent dissimilar shapes. To implement this for the shapes of migrating cells, we first segment the cell contours from images. Secondly, the cell contours are converted into a descriptor representation (i.e. the system can be modelled algebraically). Thirdly, we calculate the shape difference between every pair of shapes in the dataset and assimilate these into a large shape similarity matrix. Finally, from this matrix a low-dimensional, quantitative representation of the dataset is created - our shape space map.</p>
<sec id="sec004">
<title>Contour extraction.</title>
<p>The outline of cells from image sequences are extracted using a mean shift algorithm [<xref ref-type="bibr" rid="pcbi.1013864.ref011">11</xref>]. To overcome any limitations of the mean shift algorithm as a pixel-based segmentation approach, an interactive interface is provided as part of the ShapeSpaceExplorer software to enable manual editing (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1a</xref>). Cell segmentations can also be imported, if they have been created using another method or software.</p>
<fig id="pcbi.1013864.g001" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g001</object-id><label>Fig 1</label><caption><title>ShapeSpaceExplorer workflow.</title><p>Visual representation of the workflow by ShapeSpaceExplorer software. a: Images of RPE1 cells stably expressing GFP-LifeAct are segmented using a mean shift algorithm and manual post-processing. b: Each closed curve representing the cell shape is approximated by 512 nodes. The differences between the curves are measured using the best alignment metric (BAM) <xref ref-type="disp-formula" rid="pcbi.1013864.e006">2</xref>. c: The pairwise distances between each pair of curves are stored in the shape similarity matrix. d: The eigenvectors for the first 5 eigenvalues of the shape similarity matrix are calculated to create the diffusion map embedding. The majority of the shape information is captured by the first two diffusion coordinates. e: Hierarchical clustering using affinity propagation with seriation extension can be used to identify similar shapes independently of diffusion map embedding. f: The hierarchical cluster membership can be colour-coded in shape space, showing how clusters are conserved within the shape space map. Exemplars for each cluster are shown. For example, for the dataset used here the red cluster contains elongated cell shapes, while the blue cluster contains more rounded shapes. g: The shapes for a single cell can be tracked through the shape space and centroid positions plotted to illustrate their migration through real space.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g001" xlink:type="simple"/></fig>
</sec>
<sec id="sec005">
<title>Cell tracking.</title>
<p>To separate analysis of the cell migration from analysis of the shape of the cells, the software defines a cell’s track to be the path of the centroid of the cell over the course of the image sequences. The centroid is computed as the mean of all pixel positions contained within the cell segmentation. As a preprocessing step, cell tracks with missing frames (either because the cell was touching another cell or the boundary could not be segmented) are automatically split and assigned distinct cell IDs for each continuous track segment. The user can filter the tracks for inclusion in the analysis by a minimum number of frames. We used tracks with at least 5 frames for the datasets analysed here. However, outlines from still images can be included in the morphology analysis.</p>
</sec>
<sec id="sec006">
<title>Shape similarity measurement with Best Alignment Metric (BAM).</title>
<p>In order to provide a robust solution, the software does not rely on any <italic>a priori</italic> information. ShapeSpaceExplorer first approximates each closed curve by a sequence of N complex numbers whose mean lies at zero. The software then utilises a shape similarity measure to compute pairwise alignments of shapes, which we call Best Alignment Metric (BAM). BAM is a novel shape distance measure specifically designed for the comparison of independent simple closed planar curves. This will find the pairwise distance between corresponding pairs of points on the curves after the curves have been mutually aligned, reparameterised and interpolated so as to best emphasize the similarities between the curves (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1b</xref>). The formulation employs the Fourier transforms of the curves and circular convolution to efficiently compute the overall optimum solution.</p>
<p>The proposed BAM for discrete curves <inline-formula id="pcbi.1013864.e001"><alternatives><graphic id="pcbi.1013864.e001g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e001" xlink:type="simple"/><mml:math display="inline" id="M1"><mml:mrow><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>ν</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">{</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>ν</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mi>ℂ</mml:mi><mml:mo>:</mml:mo><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mspace width="0.167em"/><mml:mrow><mml:mo>−</mml:mo></mml:mrow><mml:mspace width="0.167em"/><mml:mn>1</mml:mn><mml:mo stretchy="false">}</mml:mo></mml:mrow></mml:math></alternatives></inline-formula>, where N is the number of evenly distributed points used to represent each curve, is defined as</p>
<disp-formula id="pcbi.1013864.e002"><alternatives><graphic id="pcbi.1013864.e002g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e002" xlink:type="simple"/><mml:math display="block" id="M2"><mml:mrow><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>B</mml:mi><mml:mi>A</mml:mi><mml:mi>M</mml:mi></mml:mrow></mml:msup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>υ</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>ν</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:mfrac><mml:munder><mml:mo>min</mml:mo><mml:mrow><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mi>r</mml:mi><mml:mo>,</mml:mo><mml:mi>θ</mml:mi><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow></mml:mrow></mml:munder><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>ν</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>−</mml:mo><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>θ</mml:mi></mml:mrow></mml:msup><mml:msub><mml:mi>υ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>+</mml:mo><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mrow></mml:math></alternatives> <label>(1)</label></disp-formula>
<p>where <italic>r</italic> is the cyclic shift of the starting point around the curve, <inline-formula id="pcbi.1013864.e003"><alternatives><graphic id="pcbi.1013864.e003g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e003" xlink:type="simple"/><mml:math display="inline" id="M3"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> is the rotation angle of the plane, the index <inline-formula id="pcbi.1013864.e004"><alternatives><graphic id="pcbi.1013864.e004g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e004" xlink:type="simple"/><mml:math display="inline" id="M4"><mml:mrow><mml:mi>j</mml:mi><mml:mspace width="0.167em"/><mml:mrow><mml:mo>+</mml:mo></mml:mrow><mml:mspace width="0.167em"/><mml:mi>r</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> is taken modulo <italic>N</italic>, and the minimum is taken over <inline-formula id="pcbi.1013864.e005"><alternatives><graphic id="pcbi.1013864.e005g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e005" xlink:type="simple"/><mml:math display="inline" id="M5"><mml:mrow><mml:mo stretchy="false">{</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mo>…</mml:mo><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mspace width="0.167em"/><mml:mrow><mml:mo>−</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">}</mml:mo><mml:mo>×</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mi>π</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></alternatives></inline-formula>. The main advantage of the proposed alignment metric is that it can be rapidly implemented by being reformulated to the following expression,</p>
<disp-formula id="pcbi.1013864.e006"><alternatives><graphic id="pcbi.1013864.e006g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e006" xlink:type="simple"/><mml:math display="block" id="M6"><mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>B</mml:mi><mml:mi>A</mml:mi><mml:mi>M</mml:mi></mml:mrow></mml:msup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>υ</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>ν</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>=</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>ν</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>−</mml:mo><mml:mn>2</mml:mn><mml:munder><mml:mo>max</mml:mo><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:munder><mml:munderover><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>ν</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mover><mml:mrow><mml:msub><mml:mi>υ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>+</mml:mo><mml:mi>r</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mrow></mml:math></alternatives> <label>(2)</label></disp-formula>
<p>The reasons that this admits a rapid implementation are threefold. Firstly, many of the terms depend only on one curve and so can be computed only once per curve, not per pair of curves. Secondly, <inline-formula id="pcbi.1013864.e007"><alternatives><graphic id="pcbi.1013864.e007g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e007" xlink:type="simple"/><mml:math display="inline" id="M7"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> is removed, as this formulation explicitly computes the appropriate quantity over all rotations. Thirdly, the last term in the expression can be rapidly computed through use of circular convolution. The fast implementation of BAM allows processing of large datasets.</p>
<p>Algorithm 1 presents the pseudocode for measuring BAM over a large dataset of curves. It highlights the fact that many of the terms can be calculated once for each curve, rather than each pair of curves, which saves a large calculation cost.</p>
<p><bold>Algorithm 1 Computing the best alignment metric between pairs of curves in a large dataset.</bold></p>
<p specific-use="line"><monospace><bold>Input</bold>: <inline-formula id="pcbi.1013864.e008"><alternatives><graphic id="pcbi.1013864.e008g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e008" xlink:type="simple"/><mml:math display="inline" id="M8"><mml:mrow><mml:mi>𝒰</mml:mi></mml:mrow></mml:math></alternatives></inline-formula>, a set of <italic>M</italic> planar curves. Each curve is represented by a cyclic sequence, <inline-formula id="pcbi.1013864.e009"><alternatives><graphic id="pcbi.1013864.e009g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e009" xlink:type="simple"/><mml:math display="inline" id="M9"><mml:mrow><mml:mi>υ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi>…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></alternatives></inline-formula>, of <italic>N</italic> equally spaced complex numbers with mean equal to zero. <bold>Output</bold>: <italic>D</italic>, an <inline-formula id="pcbi.1013864.e010"><alternatives><graphic id="pcbi.1013864.e010g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e010" xlink:type="simple"/><mml:math display="inline" id="M10"><mml:mrow><mml:mi>N</mml:mi><mml:mi>×</mml:mi><mml:mi>N</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> dissimilarity matrix.</monospace></p>
<p specific-use="line"><monospace><italic>for-loop</italic> over <inline-formula id="pcbi.1013864.e011"><alternatives><graphic id="pcbi.1013864.e011g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e011" xlink:type="simple"/><mml:math display="inline" id="M11"><mml:mrow><mml:mi>υ</mml:mi><mml:mo>∈</mml:mo><mml:mi>𝒰</mml:mi></mml:mrow></mml:math></alternatives></inline-formula></monospace></p>
<list list-type="simple">
<list-item><p specific-use="line"><monospace>1. Compute <inline-formula id="pcbi.1013864.e012"><alternatives><graphic id="pcbi.1013864.e012g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e012" xlink:type="simple"/><mml:math display="inline" id="M12"><mml:mrow><mml:mi>s</mml:mi><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mi>υ</mml:mi><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives></inline-formula></monospace></p></list-item>
<list-item><p specific-use="line"><monospace>2. Compute <inline-formula id="pcbi.1013864.e013"><alternatives><graphic id="pcbi.1013864.e013g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e013" xlink:type="simple"/><mml:math display="inline" id="M13"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>, the fast Fourier transform of <inline-formula id="pcbi.1013864.e014"><alternatives><graphic id="pcbi.1013864.e014g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e014" xlink:type="simple"/><mml:math display="inline" id="M14"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mover><mml:mrow><mml:msub><mml:mi>υ</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>.</monospace></p></list-item>
<list-item><p specific-use="line"><monospace>3. Compute <inline-formula id="pcbi.1013864.e015"><alternatives><graphic id="pcbi.1013864.e015g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e015" xlink:type="simple"/><mml:math display="inline" id="M15"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>, the fast Fourier transform of <inline-formula id="pcbi.1013864.e016"><alternatives><graphic id="pcbi.1013864.e016g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e016" xlink:type="simple"/><mml:math display="inline" id="M16"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>υ</mml:mi><mml:mrow><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mi>j</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>.</monospace></p></list-item>
</list>
<p specific-use="line"><monospace><italic>end</italic></monospace></p>
<p specific-use="line"><monospace><italic>for-loop</italic> over <inline-formula id="pcbi.1013864.e017"><alternatives><graphic id="pcbi.1013864.e017g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e017" xlink:type="simple"/><mml:math display="inline" id="M17"><mml:mrow><mml:mi>υ</mml:mi><mml:mo>∈</mml:mo><mml:mi>𝒰</mml:mi></mml:mrow></mml:math></alternatives></inline-formula></monospace></p>
<p specific-use="line">  <monospace><italic>for-loop</italic> over <inline-formula id="pcbi.1013864.e018"><alternatives><graphic id="pcbi.1013864.e018g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e018" xlink:type="simple"/><mml:math display="inline" id="M18"><mml:mrow><mml:mi>ν</mml:mi><mml:mo>∈</mml:mo><mml:mi>𝒰</mml:mi></mml:mrow></mml:math></alternatives></inline-formula></monospace></p>
<list list-type="simple">
<list-item><p specific-use="line">  <monospace>1. Compute <inline-formula id="pcbi.1013864.e019"><alternatives><graphic id="pcbi.1013864.e019g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e019" xlink:type="simple"/><mml:math display="inline" id="M19"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>, the inverse fast Fourier transform of <inline-formula id="pcbi.1013864.e020"><alternatives><graphic id="pcbi.1013864.e020g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e020" xlink:type="simple"/><mml:math display="inline" id="M20"><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mrow><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>ν</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></alternatives></inline-formula>.</monospace></p></list-item>
<list-item><p specific-use="line">  <monospace>2. Compute <inline-formula id="pcbi.1013864.e021"><alternatives><graphic id="pcbi.1013864.e021g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e021" xlink:type="simple"/><mml:math display="inline" id="M21"><mml:mrow><mml:mi>A</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mo>max</mml:mo><mml:mi>j</mml:mi></mml:msub><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">|</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo fence="true" form="postfix" stretchy="true">|</mml:mo></mml:mrow></mml:mrow></mml:math></alternatives></inline-formula>.</monospace></p></list-item>
<list-item><p specific-use="line">  <monospace>3. Compute <inline-formula id="pcbi.1013864.e022"><alternatives><graphic id="pcbi.1013864.e022g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e022" xlink:type="simple"/><mml:math display="inline" id="M22"><mml:mrow><mml:mi>D</mml:mi><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>ν</mml:mi><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:mi>s</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>υ</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>ν</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>−</mml:mo><mml:mn>2</mml:mn><mml:mi>A</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:math></alternatives></inline-formula>.</monospace></p></list-item>
</list>
<p specific-use="line">  <monospace><italic>end</italic></monospace></p>
<p specific-use="line"><monospace><italic>end</italic></monospace></p>
<p>While retaining all spatiotemporal information for downstream analysis, to determine the distance between each pair of shapes, BAM only considers the cell outlines normalised to closed curves with the same number of equal spaced nodes. During development of the software, it was found that 512 nodes are sufficient to accurately describe the cell shapes tested. BAM calculates the minimal L<sup>2</sup>-norm between both curves, i.e. minimises the sum of the squared distances between corresponding points, following translation, rotation and renumbering of nodes to achieve optimal alignment and node pairing in both curves. To retain any shape differences between left and right-turning cells, we did not include reflection as a permissible curve transformation. We find that translation of all curves to lie with their mean at the origin minimises the L<sup>2</sup>-norm over all possible translations. The output of BAM is a shape similarity matrix with the BAM distances between each pair of curves (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1c</xref>).</p>
</sec>
<sec id="sec007">
<title>Diffusion map embedding.</title>
<p>The Diffusion Maps (DM) framework is a nonlinear dimensionality reduction technique that generates a low-dimensional coordinate representation of data such that similar data points in the high-dimensional space are represented by new low-dimensional points that are close to each other. To perform a DM-based low-dimensional embedding of n contours, {<italic>f</italic><sub><italic>i</italic></sub>} where <inline-formula id="pcbi.1013864.e023"><alternatives><graphic id="pcbi.1013864.e023g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e023" xlink:type="simple"/><mml:math display="inline" id="M23"><mml:mrow><mml:mn>1</mml:mn><mml:mo>≤</mml:mo><mml:mi>i</mml:mi><mml:mo>≤</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></alternatives></inline-formula>, we make use of the simple Gaussian kernel <italic>ω</italic> for curves <italic>υ</italic> and <italic>ν</italic>,</p>
<disp-formula id="pcbi.1013864.e024"><alternatives><graphic id="pcbi.1013864.e024g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e024" xlink:type="simple"/><mml:math display="block" id="M24"><mml:mrow><mml:mrow><mml:mi>ω</mml:mi><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mi>υ</mml:mi><mml:mo>,</mml:mo><mml:mi>ν</mml:mi><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mi>exp</mml:mi><mml:mfrac><mml:mrow><mml:mo>−</mml:mo><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>B</mml:mi><mml:mi>A</mml:mi><mml:mi>M</mml:mi></mml:mrow></mml:msup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>υ</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mi>ν</mml:mi><mml:mo stretchy="false">]</mml:mo><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:msup><mml:mi>σ</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mrow></mml:mrow></mml:math></alternatives> <label>(3)</label></disp-formula>
<p>where <italic>d<sup>BAM</sup></italic> is our proposed similarity measure and <inline-formula id="pcbi.1013864.e026"><alternatives><graphic id="pcbi.1013864.e026g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e026" xlink:type="simple"/><mml:math display="inline" id="M26"><mml:mrow><mml:mi>σ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> is the chosen kernel bandwidth.</p>
<p>The selection of kernel bandwidth is a very important choice in this context and appears in many other contexts in computer science. The interpretation of this parameter is contextual scale, <italic>i.e.</italic> at what distance is something described as close and what is described as far away? In ShapeSpaceExplorer, <inline-formula id="pcbi.1013864.e027"><alternatives><graphic id="pcbi.1013864.e027g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e027" xlink:type="simple"/><mml:math display="inline" id="M27"><mml:mrow><mml:mi>σ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula> is set to be the median of all pairwise distances, which has been shown to be robust to outliers [<xref ref-type="bibr" rid="pcbi.1013864.ref012">12</xref>].</p>
<p>At the core of this algorithm is an eigendecomposition with the eigenvectors representing the coordinates in the final shape space representation. While the number of eigenvectors and hence the dimensionality of the dataset can be chosen to reflect the data, during development 5 eigenvectors were found to be sufficient (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1d</xref> and <xref ref-type="supplementary-material" rid="pcbi.1013864.s002">S1 Fig</xref>).</p>
</sec>
<sec id="sec008">
<title>Out of sample extension.</title>
<p>In some experiments, it may not be suitable to calculate the shape space for all data at the same time. Expanding the dataset and recalculating the shape space will possibly result in a change of the diffusion coordinates. This might not be desirable if different treatments are compared to a large base dataset. To overcome this issue, ShapeSpaceExplorer includes an out of sample extension tool, which allows new data to be added without changing the learned geometry of shape space. To embed new data into an existing DM, <italic>K</italic> Nearest Neighbours is used as a regression model by simply calculating the average of the numerical target of the <italic>K</italic> nearest neighbours to a new input sample. Choosing the optimal value for <italic>K</italic> is critical and is best done by first inspecting the data. For example, a large <italic>K</italic> value is more precise as it reduces the overall noise but is computationally very expensive. In this work, we have selected <italic>K</italic> = 5 for accurate and fast assignment. We also implemented a second approach for out-of-sample-extension using Laplacian Pyramids that performs comparably. The user can select the desired method and specify the value for K if using the K-Nearest Neighbour method.</p>
</sec>
</sec>
<sec id="sec009">
<title>Data exploration</title>
<p>To enable users to efficiently and intuitively explore their data via the Shape Space, the software includes several tools. This includes:</p>
<list list-type="bullet">
<list-item><p>Shape feature calculation - properties of all the shapes in the Shape Space can be calculated and values plotted within the shape space.</p></list-item>
<list-item><p>Shape space slicing - divide the shape space into equal slices based on their diffusion map coordinates and visualise the average shape of each row and column. In combination with group analysis, distribution of data in each subsection can be analysed.</p></list-item>
<list-item><p>Interactive shape slicer - users can interactively select regions from the Shape Space and view the average shape.</p></list-item>
<list-item><p>Affinity propagation clustering - affinity propagation and seriation algorithms are implemented to automatically classify similar shapes together (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1e</xref> and <xref ref-type="fig" rid="pcbi.1013864.g001">1f</xref>). This can be used for independent validation and combined with group analysis.</p></list-item>
<list-item><p>Self organising map clustering - creates zones in the Shape Space using an unsupervised neural network. Distribution of data in each zone and trajectories of cells that move from one zone to another can be analysed with group analysis.</p></list-item>
<list-item><p>Shape space dynamics and migration - the path through real space and shape space can be visualised for each cell ID in a graphical user interface (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1g</xref>).</p></list-item>
</list>
<p>The group tool allows users to separate their input data by experimental conditions, such as control vs treatment or mutant.</p>
<p>In the next section, we demonstrate how the shape space representation and tools provided by ShapeSpaceExplorer can be used to quantitatively analyse cell morphology; the dynamics of cell shape changes; and how cell shape correlates to cell migration.</p>
</sec>
</sec>
<sec id="sec010" sec-type="results">
<title>Results</title>
<p>The outline of cells from image sequences of RPE1 cells expressing mGFP-LifeAct were extracted using the contour extraction approach described above within the ShapeSpaceExplorer graphical user interface (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1a</xref>). Manual corrections were made to segmentation errors by i) excluding cell outlines that touch the borders or overlap with other cells; ii) merging fragments of long cell extensions to prevent bias in the dataset; and iii) removing those cells that undergo mitosis or apoptosis. The resulting dataset of 37,818 shapes of migrating retinal pigment epithelial (RPE) cells required <inline-formula id="pcbi.1013864.e028"><alternatives><graphic id="pcbi.1013864.e028g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e028" xlink:type="simple"/><mml:math display="inline" id="M28"><mml:mrow><mml:mn>1.4</mml:mn><mml:mspace width="0.167em"/><mml:mrow><mml:mo>×</mml:mo></mml:mrow><mml:mspace width="0.167em"/><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mn>9</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></alternatives></inline-formula> pairwise shape comparisons. The BAM distances (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1b</xref>) were then translated into a shape similarity score using a simple Gaussian kernel (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1c</xref>). The Diffusion Maps algorithm used the resulting shape similarity matrix for the low-dimensional representation of the cell shapes [<xref ref-type="bibr" rid="pcbi.1013864.ref013">13</xref>]. Calculating <inline-formula id="pcbi.1013864.e029"><alternatives><graphic id="pcbi.1013864.e029g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e029" xlink:type="simple"/><mml:math display="inline" id="M29"><mml:mrow><mml:mn>1.4</mml:mn><mml:mspace width="0.167em"/><mml:mrow><mml:mo>×</mml:mo></mml:mrow><mml:mspace width="0.167em"/><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mn>9</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></alternatives></inline-formula> BAM distances and performing the diffusion map embedding for five dimensions was completed within five hours on a high performance desktop computer (Windows 10, Intel Core i9-7900X CPU and 128 GB of RAM running Matlab 2022b) using the sparse implementation to find the eigenvalues and eigenvectors (this is included as an option in the software). For this dataset, we find that the first two dimensions of the shape space capture 86% of the shape variation and are sufficiently accurate to represent shape variation in our dataset of migrating RPE cells (<xref ref-type="fig" rid="pcbi.1013864.g001">Fig 1d</xref>).</p>
<p>2D closed curves are often analysed with Fourier Descriptors. We believe that BAM is better suited for shape space mapping because it is reversible and we can therefore generate a shape from an arbitrary point in shape space, while during the computation of the power spectra for Fourier Descriptors the phase information is lost and therefore, there is no unique solution for the reverse transformation. Calculating the Euclidean distance between Fourier Descriptors as shape similarity measure was about 4.5 times faster than BAM. However, using both approaches to identify the 5 most similar cell shapes in our dataset relative to each of 10 randomly selected examples shows that BAM performs better and consistently picks out shapes with characteristic features (<xref ref-type="fig" rid="pcbi.1013864.g002">Fig 2a</xref>).</p>
<fig id="pcbi.1013864.g002" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g002</object-id><label>Fig 2</label><caption><title>Comparative performance of shape distance measures.</title><p>a: Each row shows a randomly selected target RPE cell outline, followed by 5 outlines identified as closest to the target outline (excluding outlines of the same cell as the target) according to the Best Alignment Metric and Fourier Descriptors. Note that BAM reliably selects shapes with the same typical characteristics such as central tail on D-shaped cell in line 5, gentle left bend of cell in line 8, straighter and longer left side of cell in line 2. b-c: Diffusion map embedding with cluster membership colour-coded in shape space showing all shapes as dot in b and exemplar shapes plotted at their respective position in shape space in c.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g002" xlink:type="simple"/></fig>
<sec id="sec011">
<title>Visualisation and quantification of cell morphology in shape space</title>
<p>We performed two independent strategies to assess the performance of our shape space map: (1) we performed affinity propagation followed by seriation and hierarchical clustering to sort cell shapes independently of the Diffusion map algorithm, and (2) we visualised the continuous distribution of shape features. The 485 exemplars resulting from Affinity propagation (AP) clustering and 4 higher order clusters generated by hierarchical clustering of the AP exemplars are preserved with high integrity in our shape space representation (<xref ref-type="fig" rid="pcbi.1013864.g001">Figs 1e</xref>, <xref ref-type="fig" rid="pcbi.1013864.g001">1f</xref>, <xref ref-type="fig" rid="pcbi.1013864.g002">2b</xref>, and <xref ref-type="fig" rid="pcbi.1013864.g002">2c</xref>). This also applies to a dataset of highly diverse 2D outlines of animals and inanimate objects (<xref ref-type="supplementary-material" rid="pcbi.1013864.s002">S1 Fig</xref>).</p>
<p>Calculating the average cell shapes in slices of the shape space map enables visualising the gradual change in shape along the diffusion map coordinates (<xref ref-type="fig" rid="pcbi.1013864.g003">Fig 3a</xref>). This shows that the first coordinate predominantly captures the elongation of the cells with round cells at low values of diffusion coordinate 1 and elongated cells with long tails having high values of diffusion coordinate 1. The second coordinate captures primarily irregularity with symmetric shapes at high values of diffusion coordinate 2 and cells containing multiple protrusions found towards the bottom of the map (i.e. low values of diffusion coordinate 2). Several shape features were calculated for the embedded shapes and their values were colour-coded to the corresponding points in the shape space representation. Distribution of the shape features is smooth, suggesting that changes in shape have been captured appropriately in our shape space representation (<xref ref-type="fig" rid="pcbi.1013864.g003">Fig 3b</xref>).</p>
<fig id="pcbi.1013864.g003" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g003</object-id><label>Fig 3</label><caption><title>Diffusion coordinates and BAM values correlate to shape features.</title><p>a: Average cell shapes for shape space sliced into a regular grid. This visualises which shape changes are captured by each of the diffusion map coordinates. b: Shape features colour coded for each shape in shape space: the ratio of minimal and maximal distances of a point on the curve to the centre of mass (min/max ratio), ratio of cell area to area of convex hull (solidity), ratio of minor and major axes length of an ellipse fitted to the shape (eccentricity) and the angle of the major cell axis relative to x axis in real space (orientation; used as shape-independent control). The calculation of these properties is described in the supplementary materials (<xref ref-type="supplementary-material" rid="pcbi.1013864.s003">S1 Text</xref>). X and Y axes show diffusion coordinates 1 and 2 multiplied by 10<sup>7</sup>. c: The shape space is divided into regions of similar shapes using a self organising map (see <xref ref-type="supplementary-material" rid="pcbi.1013864.s003">S1 Text</xref> for details). The same region colours are used when plotting solidity of shapes against the min/max ratio. d: Histogram of shapes divided into 100x100 bins displaying the relationship between the Euclidean distance of two shapes in our diffusion map with the BAM distance. In comparison, the Euclidean distance of two shapes in a solidity versus min/max ratio plot are correlated to the BAM distance. Correlation coefficient is displayed at top of each plot.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g003" xlink:type="simple"/></fig>
<p>Correlation analysis was carried out by computing the correlation between each of our Diffusion coordinates with the shape features using:</p>
<disp-formula id="pcbi.1013864.e030"><alternatives><graphic id="pcbi.1013864.e030g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e030" xlink:type="simple"/><mml:math display="block" id="M30"><mml:mrow><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>−</mml:mo><mml:mover><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>−</mml:mo><mml:mover><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>−</mml:mo><mml:mover><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>·</mml:mo><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup><mml:msup><mml:mrow><mml:mo fence="true" form="prefix" stretchy="true">(</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>−</mml:mo><mml:mover><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover><mml:mo fence="true" form="postfix" stretchy="true">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:mrow></mml:mrow></mml:math></alternatives> <label>(4)</label></disp-formula>
<p>where <italic>N</italic> is the number of cell shapes <italic>N</italic>=37818, <italic>x</italic><sub><italic>t</italic></sub> represents the relevant Diffusion coordinate and <italic>y</italic><sub><italic>t</italic></sub> represents the shape feature value for curve <italic>t</italic> and <inline-formula id="pcbi.1013864.e031"><alternatives><graphic id="pcbi.1013864.e031g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e031" xlink:type="simple"/><mml:math display="inline" id="M31"><mml:mrow><mml:mover><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover></mml:mrow></mml:math></alternatives></inline-formula>, <inline-formula id="pcbi.1013864.e032"><alternatives><graphic id="pcbi.1013864.e032g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e032" xlink:type="simple"/><mml:math display="inline" id="M32"><mml:mrow><mml:mover><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">―</mml:mo></mml:mover></mml:mrow></mml:math></alternatives></inline-formula> represent the respective means. This confirms that while cell orientation and area distribute evenly in shape space, the ratio of minimal to maximal distance of points to the centre of mass correlates best with the first diffusion coordinate, and solidity (the ratio of area to convex hull) correlates closest to the second diffusion coordinate (see <xref ref-type="table" rid="pcbi.1013864.t001">Table 1</xref>). This is consistent with the conclusions from inspecting the average shapes along each coordinate as described above whereby increasing cell elongation is captured with increasing values of diffusion coordinate 1 and decreasing values of minimal and maximal distance ratio; and irregularities such as multiple protrusions are associated with decreasing values of diffusion coordinate 2 and decreasing values of solidity.</p>
<table-wrap id="pcbi.1013864.t001" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.t001</object-id><label>Table 1</label><caption><title>This table shows the correlation of simple shape features with the diffusion coordinates (D.C.) from the Diffusion Maps representation of our RPE1 dataset.</title></caption>
<alternatives><graphic id="pcbi.1013864.t001g" mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.t001" xlink:type="simple"/><table><colgroup>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
</colgroup>
<thead>
<tr>
<th align="left">Shape Feature</th>
<th align="left">D.C.1</th>
<th align="left">D.C.2</th>
<th align="left">D.C.3</th>
<th align="left">D.C.4</th>
<th align="left">D.C.5</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Area</td>
<td align="left">0.1882</td>
<td align="left">0.1888</td>
<td align="left">0.0869</td>
<td align="left">0.0141</td>
<td align="left">0.0063</td>
</tr>
<tr>
<td align="left">Major Axis Length</td>
<td align="left">0.7949</td>
<td align="left">–0.0714</td>
<td align="left">0.0411</td>
<td align="left">0.0835</td>
<td align="left">–0.0039</td>
</tr>
<tr>
<td align="left">Minor Axis Length</td>
<td align="left">–0.3844</td>
<td align="left">–0.5346</td>
<td align="left">–0.1235</td>
<td align="left">–0.0735</td>
<td align="left">0.0130</td>
</tr>
<tr>
<td align="left">Eccentricity</td>
<td align="left">0.8303</td>
<td align="left">0.2197</td>
<td align="left">0.0740</td>
<td align="left">0.1650</td>
<td align="left">–0.0369</td>
</tr>
<tr>
<td align="left">Orientation</td>
<td align="left">–0.0035</td>
<td align="left">–0.0261</td>
<td align="left">–0.0091</td>
<td align="left">0.0111</td>
<td align="left">0.0052</td>
</tr>
<tr>
<td align="left">Convex Area</td>
<td align="left">0.4258</td>
<td align="left">–0.4339</td>
<td align="left">–0.0096</td>
<td align="left">0.0349</td>
<td align="left">0.0079</td>
</tr>
<tr>
<td align="left">Solidity</td>
<td align="left">–0.6427</td>
<td align="left">0.6315</td>
<td align="left">0.1268</td>
<td align="left">–0.0382</td>
<td align="left">0.0024</td>
</tr>
<tr>
<td align="left">Extent</td>
<td align="left">–0.7858</td>
<td align="left">0.4063</td>
<td align="left">0.1378</td>
<td align="left">0.0071</td>
<td align="left">0.0016</td>
</tr>
<tr>
<td align="left">Perimeter</td>
<td align="left">0.6643</td>
<td align="left">–0.4763</td>
<td align="left">0.0498</td>
<td align="left">0.0057</td>
<td align="left">0.0115</td>
</tr>
<tr>
<td align="left">Circularity</td>
<td align="left">0.7664</td>
<td align="left">–0.4899</td>
<td align="left">–0.0040</td>
<td align="left">0.0181</td>
<td align="left">–0.0559</td>
</tr>
<tr>
<td align="left">Symmetry</td>
<td align="left">–0.4144</td>
<td align="left">0.6222</td>
<td align="left">0.2296</td>
<td align="left">–0.1220</td>
<td align="left">0.0090</td>
</tr>
<tr>
<td align="left">Max distance from centre</td>
<td align="left">0.8049</td>
<td align="left">–0.2267</td>
<td align="left">–0.0853</td>
<td align="left">–0.0860</td>
<td align="left">0.0063</td>
</tr>
<tr>
<td align="left">Min distance from centre</td>
<td align="left">–0.5287</td>
<td align="left">0.0220</td>
<td align="left">0.1607</td>
<td align="left">–0.2799</td>
<td align="left">0.0338</td>
</tr>
<tr>
<td align="left">Min/Max centre distance ratio</td>
<td align="left">–0.9053</td>
<td align="left">0.2401</td>
<td align="left">0.1629</td>
<td align="left">–0.0979</td>
<td align="left">0.0343</td>
</tr>
<tr>
<td align="left">Irregularity</td>
<td align="left">0.8530</td>
<td align="left">–0.1703</td>
<td align="left">–0.1468</td>
<td align="left">–0.0923</td>
<td align="left">0.0033</td>
</tr>
<tr>
<td align="left">Irregularity2</td>
<td align="left">–0.5387</td>
<td align="left">0.3960</td>
<td align="left">0.0363</td>
<td align="left">–0.0811</td>
<td align="left">–0.0157</td>
</tr>
</tbody>
</table>
</alternatives></table-wrap>
<p>To test whether using two shape features instead of the diffusion map embedding would faithfully represent the shape similarity in a map, we plotted solidity against minimal to maximal distance ratio. While areas with similar shapes are roughly preserved, the space is compressed and distorted suggesting that these shape parameters are dependent (<xref ref-type="fig" rid="pcbi.1013864.g003">Fig 3c</xref>). To compare both approaches more quantitatively, we calculated the Euclidean norm of pairwise differences for the solidity and distance ratio and the first two diffusion coordinates. When compared to the BAM Distance, the relationship is approximately linear with a significantly higher correlation factor (0.84 versus 0.61) for diffusion coordinates compared to shape feature coordinates (<xref ref-type="fig" rid="pcbi.1013864.g003">Fig 3c</xref> and <xref ref-type="fig" rid="pcbi.1013864.g003">3d</xref>).</p>
<p>When comparing cell morphology in perturbation experiments, usually specific shape features are measured, requiring prior knowledge of important parameters. Using the ShapeSpaceExplorer software, morphology classes can be defined as regions in shape space (<xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4a</xref>, <xref ref-type="fig" rid="pcbi.1013864.g004">4c</xref>, and <xref ref-type="fig" rid="pcbi.1013864.g004">4d</xref>) and the relative abundance of shapes in different datasets computed (<xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4b</xref> and <xref ref-type="fig" rid="pcbi.1013864.g004">4e</xref>). To do this, the shapes from different experimental conditions are either embedded into shape space at the same time or later added using out-of-sample extension (OoSE). As proof-of-principle, we performed an RNAi experiment in which we treated RPE1 cells expressing mGFP-LifeAct with siRNA against KIF1C, a molecular motor implicated in cell adhesion protein transport [<xref ref-type="bibr" rid="pcbi.1013864.ref002">2</xref>] and a non-targeting control siRNA. From this experiment, we extracted 2836 shapes from siControl and 5009 shapes from siKif1C-treated cells and embedded these into the shape space of the large dataset of untreated RPE1 cells shown in <xref ref-type="fig" rid="pcbi.1013864.g001">Figs 1</xref> and <xref ref-type="fig" rid="pcbi.1013864.g003">3</xref>. We then determined the fraction of shapes in the 8 regions defined by 4 equal slices along the 1st dimension and 2 equal slices along the 2nd dimension of shape space (<xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4a</xref> and <xref ref-type="fig" rid="pcbi.1013864.g004">4b</xref>). Likewise, we analysed membership in regions whose boundaries were derived with the help of a self-organising map (<xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4c</xref>, <xref ref-type="fig" rid="pcbi.1013864.g004">4d</xref>, and <xref ref-type="fig" rid="pcbi.1013864.g004">4e</xref>). In agreement with previous results showing that Kif1C is required to maintain cell tails [<xref ref-type="bibr" rid="pcbi.1013864.ref002">2</xref>], we find the majority of siKIF1C-treated cells in the regions with round or slightly elongated morphology (Region 1 in <xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4</xref>), and significantly fewer highly elongated cells with long tails were present in the siKif1C dataset compared to control cells (Region 4 in <xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4</xref>). Thus, our algorithm allows unbiased classification and quantification of cell shapes and determining the major morphological differences between two datasets without any prior knowledge.</p>
<fig id="pcbi.1013864.g004" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g004</object-id><label>Fig 4</label><caption><title>Incorporation of additional data using OoSE and group analysis.</title><p>a: Shape space for the original untreated dataset (grey) with additional data from cell treated with siControl (blue) and siKif1C (orange). 8 regions obtained by equally slicing shape space with a 4-by-2 grid are indicated with dashed lines and grey circled numbers. b: Bar graphs showing the fractions of shapes, which lie in each of the 8 regions of shape space as indicated in a with the average shape for the region plotted above each graph. c-d: Diffusion map regions specified using a self organising map with data from cells treated with siControl (c) and siKIF1C (d) plotted in colour on top of the untreated dataset shown in grey. e: Stacked bar graph showing the fraction of shapes within the 4 regions indicated in c and d.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g004" xlink:type="simple"/></fig>
</sec>
<sec id="sec012">
<title>Visualisation and modelling of shape dynamics</title>
<p>We considered that to understand cell migration, the distribution of shapes alone would not be sufficient, but rather the dynamics of changing from one shape to another. The 2-dimensional shape space map allows easy visualisation of the trajectory of single cells through shape space (<xref ref-type="fig" rid="pcbi.1013864.g001">Figs 1g</xref> and <xref ref-type="fig" rid="pcbi.1013864.g005">5a</xref>). Differences in shape dynamics can be detected as the speed and directionality of trajectories through shape space. In line with the idea that the first diffusion coordinate captures the largest variability in the dataset, the majority of shape transitions occur parallel to that axis (<xref ref-type="fig" rid="pcbi.1013864.g005">Fig 5b</xref>). While the overall speed of shape transitions is similar in RPE1 cells treated with siRNA against KIF1C and a non-targeting control (<xref ref-type="fig" rid="pcbi.1013864.g001">Figs 1g</xref> and <xref ref-type="fig" rid="pcbi.1013864.g005">5c</xref>), spatially resolved analysis shows that tail retractions (i.e. shape transitions of highly elongated cells towards smaller values of diffusion coordinate 1) occur about 50% more rapidly in KIF1C-depleted cells than in siControl-treated cells (<xref ref-type="fig" rid="pcbi.1013864.g005">Fig 5d</xref> and <xref ref-type="fig" rid="pcbi.1013864.g005">5e</xref>). This is in agreement with previously published data on cell tail dynamics in KIF1C-depleted cells [<xref ref-type="bibr" rid="pcbi.1013864.ref002">2</xref>].</p>
<fig id="pcbi.1013864.g005" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g005</object-id><label>Fig 5</label><caption><title>Dynamics of shape changes.</title><p>a: Cells can be tracked through shape space. All the tracks are shown for the first two diffusion coordinates for the untreated RPE1 cell dataset. A subset of track segments are shown as arrows to indicate directions. b: Rose plots showing the direction of change in an 8-by-4 grid of equally sliced shape space regions for the untreated cell dataset. Regions without cell tracks are left blank. The boxed region contains cell shapes with tails (see <xref ref-type="fig" rid="pcbi.1013864.g002">Figs 2c</xref> and <xref ref-type="fig" rid="pcbi.1013864.g003">3a</xref>) with values between <inline-formula id="pcbi.1013864.e033"><alternatives><graphic id="pcbi.1013864.e033g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e033" xlink:type="simple"/><mml:math display="inline" id="M33"><mml:mrow><mml:mo>−</mml:mo><mml:msup><mml:mn>45</mml:mn><mml:mo>∘</mml:mo></mml:msup></mml:mrow></mml:math></alternatives></inline-formula> and <inline-formula id="pcbi.1013864.e034"><alternatives><graphic id="pcbi.1013864.e034g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e034" xlink:type="simple"/><mml:math display="inline" id="M34"><mml:mrow><mml:msup><mml:mn>45</mml:mn><mml:mo>∘</mml:mo></mml:msup></mml:mrow></mml:math></alternatives></inline-formula>, i.e. towards larger values of diffusion coordinate 1 are considered shapes undergoing tail elongation, while those with values between <inline-formula id="pcbi.1013864.e035"><alternatives><graphic id="pcbi.1013864.e035g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e035" xlink:type="simple"/><mml:math display="inline" id="M35"><mml:mrow><mml:msup><mml:mn>135</mml:mn><mml:mo>∘</mml:mo></mml:msup></mml:mrow></mml:math></alternatives></inline-formula> and <inline-formula id="pcbi.1013864.e036"><alternatives><graphic id="pcbi.1013864.e036g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e036" xlink:type="simple"/><mml:math display="inline" id="M36"><mml:mrow><mml:msup><mml:mn>225</mml:mn><mml:mo>∘</mml:mo></mml:msup></mml:mrow></mml:math></alternatives></inline-formula>, i.e. toward smaller values of diffusion coordinate 1 are considered undertaking tail retraction. c-e: Distribution plots showing the average speed of shape changes per cell tracked in siControl and siKIF1C datasets (c), tail elongation speeds (d) and tail retraction speeds (e) as indicated with blue (elongation) and orange (retraction) in the boxed region in <xref ref-type="fig" rid="pcbi.1013864.g004">Fig 4b</xref>. Speed is shown as euclidean distance in shape space in a 5 min interval. n = 95, 74 cell tracks, 289, 139 elongation events, 319, 213 retraction events in siControl, KIF1C dataset respectively. Diamonds indicate mean value. p value from Kuskall-Wallis test.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g005" xlink:type="simple"/></fig>
<p>We next asked whether analysing the temporal shape information is sufficient to predict cell migration behaviour. Cells undergo directional change using several distinct pathways transitioning through different morphology intermediates (<xref ref-type="fig" rid="pcbi.1013864.g006">Fig 6a</xref>). Two of these pathways are front-led, with either a drifting front causing a gradual change in direction and a curved cell shape during the turn or with a splitting front whereby one of the forks takes over as new front. The third pathway is caused by a competing protrusion from the side or back of the cell that takes over as the front. The fourth pathway requires the depolarisation of the cell, often triggered by the retraction of the cell tail and the following repolarisation in a new direction (<xref ref-type="fig" rid="pcbi.1013864.g006">Fig 6a</xref>). We considered that these morphological transitions are captured as trajectories in shape space and that therefore the shape space trajectories contain information on cell behaviour.</p>
<fig id="pcbi.1013864.g006" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g006</object-id><label>Fig 6</label><caption><title>Model to detect cell turns.</title><p>a: Schematic and prevalence of four different modes of cell turning in RPE1 cells: depolarisers contract and then protrude into a new direction, bananas gradually change direction of protrusion resulting in curved cell shape at turn, bifurcaters split the cell front with one front later becoming the new rear and the other the new front, protruders form a new protrusion at the side or rear that becomes the new front. All four modes account for roughly a quarter of observed cell turns in RPE1 cells expressing GFP-Actin. n=37 cells. b-d: Example of depolariser from training set for Hidden Markov Model (HMM). All 43 frames in the track were classified into one of four categories representing important stages of the mechanism: red, green, yellow and blue corresponding to polarised, depolarised, depolarising and repolarising respectively. Selected stills from timelapse movie in b, corresponding segmented outlines and the path of the ’centre of mass’ of the cell in real space in c and track through the Diffusion Maps based shape representation in d. Selected frames shown in b are shown with larger dots in c and d. The asterisked red dot corresponds to the first frame in the sequence. Time is given in minutes, the scale bar corresponds to 25 <inline-formula id="pcbi.1013864.e037"><alternatives><graphic id="pcbi.1013864.e037g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e037" xlink:type="simple"/><mml:math display="inline" id="M37"><mml:mrow><mml:mi mathvariant="normal">μ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula>m. Grey dots in d are positions of the shapes from full RPE1 dataset described in <xref ref-type="fig" rid="pcbi.1013864.g001">Figs 1</xref>–<xref ref-type="fig" rid="pcbi.1013864.g003">3</xref>. e: Diffusion map embedding of RPE1 cells and training of 4-state Hidden Markov Model with polarised (red), depolarised (green) and two transition states depolarising (yellow) and repolarising (blue) to which a 2D Gaussian was fitted, displayed in the plots by a diamond as the mean and an ellipse representing the covariance. In our framework, we are predicting that the cell turns will coincide with repolarisation (blue) events.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g006" xlink:type="simple"/></fig>
<p>As a proof-of-principle, we set out to test whether we can detect sequences of cell contraction and elongation in our dataset to predict cell turns from the shape information alone. To do this, we trained a Hidden Markov Model (HMM) with 10 typical image sequences showing a depolarisation-induced turn. We classified shapes into four states: polarised, depolarised, depolarising (i.e. transitioning between polarised to depolarised) and polarising (i.e. transitioning between depolarised to polarised) and fit a Gaussian to their distribution in shape space (<xref ref-type="fig" rid="pcbi.1013864.g006">Fig 6b</xref>, <xref ref-type="fig" rid="pcbi.1013864.g006">6c</xref>, <xref ref-type="fig" rid="pcbi.1013864.g006">6d</xref>, and <xref ref-type="fig" rid="pcbi.1013864.g006">6e</xref>). The HMM was then used to assign the hidden states to 440 new shape sequences from our dataset of migrating RPE1 cells. We predict that directional change occurs upon repolarisation. Therefore, we made a turn prediction for the following sequence of states: depolarised - polarising - polarised with the turn point to lie at the moment of polarisation. From that prediction follows that segments between the turns should be straight. While the latter is a simplification as we would not expect to detect all 4 modes of cell turning, we continued to test how well that simple model correlates to the tracks of centroid positions in real space. We performed a local (40°) and distant (25°) angle check at the predicted turn points to detect abrupt as well as more gradual directional changes. We further determined the straightness of track segments between predicted turns (see <xref ref-type="supplementary-material" rid="pcbi.1013864.s003">S1 Text</xref> for details on angle and straightness checks). We found that 339 of 460 repolarisation events resulted in a turn and 500 of 889 path segments were determined to be straight segments. This suggests that 78% of the repolarisation events correspond with an angle change and examining example traces supported this (<xref ref-type="fig" rid="pcbi.1013864.g007">Fig 7a</xref> and <xref ref-type="fig" rid="pcbi.1013864.g007">7b</xref>). Furthermore, the distribution of distant angles at the detected repolarisation events is much broader than in the middle of other path segments (<xref ref-type="fig" rid="pcbi.1013864.g007">Fig 7c</xref> and <xref ref-type="fig" rid="pcbi.1013864.g007">7d</xref>). We next took 155 correctly predicted straight-turn-straight sequences and looked how precise the turning point was predicted from the repolarisation event. We defined the true location of the turn as the point that has the highest perpendicular distance to the straight line that connects the end points of the straight-turn-straight sequence. Then we measured the time delay between the predicted turn location and the true turn location (<xref ref-type="fig" rid="pcbi.1013864.g007">Fig 7f</xref>). For comparison, we also measured the time delay between the predicted turn location and the midpoint of the path segment before the true turn location and the midpoint of the segment after. We find that more than 61% of predicted turn points were within the 5 closest points (<inline-formula id="pcbi.1013864.e041"><alternatives><graphic id="pcbi.1013864.e041g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e041" xlink:type="simple"/><mml:math display="inline" id="M41"><mml:mrow><mml:mo>±</mml:mo></mml:mrow></mml:math></alternatives></inline-formula>10 min) to the true turn, while only 14% of the control points were close to a turn (<xref ref-type="fig" rid="pcbi.1013864.g007">Fig 7g</xref>). These findings demonstrate that cell shape is closely linked to cell migration behaviour. We also demonstrate that turns induced by depolarisation are a common phenomenon capturing a significant number of directional changes of migrating epithelial cells, suggesting that events at the rear of the cell have the potential to steer cell migration.</p>
<fig id="pcbi.1013864.g007" position="float"><object-id pub-id-type="doi">10.1371/journal.pcbi.1013864.g007</object-id><label>Fig 7</label><caption><title>Predicted cell turns.</title><p>a-b: Four cell tracks (A-D) each demonstrating a turn using the depolarisation mechanism, and each correctly identified with our HMM track analysis. For each track, six selected frames are shown. HMM classification is shown by a coloured circle as red, yellow, green and blue corresponding to polarised, depolarising, depolarised and repolarising respectively. Fluorescent micrographs of GFP-Actin is shown in a and segmented cell outlines and ’centre of mass’ shown in b. Scale bar is 25 <inline-formula id="pcbi.1013864.e038"><alternatives><graphic id="pcbi.1013864.e038g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pcbi.1013864.e038" xlink:type="simple"/><mml:math display="inline" id="M38"><mml:mrow><mml:mi mathvariant="normal">μ</mml:mi></mml:mrow></mml:math></alternatives></inline-formula>m. Time in minutes. c: An example track to illustrate angle analysis. The path of the centroid of a cell over time with centroid coloured according to its morphology-based HMM classification. Blue and orange lines represent the lines used for distant angle checks both at the first repolarisation event and the midpoint between two repolarisation events. d-e: Rose plots showing angles at the 460 detected repolarisation events (blue, d) and for comparison the midpoints between repolarisation events (orange, e) determined according to schematic in c. f: An example track of ’centre of mass’ centroid positions to illustrate turn prediction accuracy in straight-corner-straight subsequences. The true turn location was identified as the point with the largest perpendicular distance from the direct line between first and last point of the sequence (black arrows). The time difference (5 minute intervals between data points) was determined between true turn location and predicted turn at repolarisation events (blue) and predicted turn location and the midpoint of the straight segment before the true turn and after (red). g: Time difference of predicted turn location in 155 straight-corner-straight subsequences determined as illustrated in f relative to the true turn location (middle) and the midpoint of the track before (left) and after (right) the turn.</p></caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.g007" xlink:type="simple"/></fig>
<p>Taken together, we have proposed a framework for generating a quantitative representation of cell outlines and applied it to migrating human RPE cells. The framework is a) designed to learn the shape properties that are most responsible for the observed variation in the dataset, and so needs no prompt or supervised labelling, but can be applied to a dataset where the intrinsic degrees of freedom are not yet fully known or understood; b) has been demonstrated an effectiveness in representing a contiguous dataset where the observed variation occurs as a continuous spectrum and not as discrete clusters; and c) allows for efficient implementation to analyse large datasets. A main contribution of this work is the development of a novel shape distance measure specifically designed for the comparison of independent simple closed planar curves. This is by finding the pairwise distance between corresponding pairs of points on the curves after the curves have been mutually aligned, reparameterised, and interpolated so as to best emphasize the similarities between the curves.</p>
<p>This study shows that a quantitative interpretation of shape can be useful in seeking an understanding of the mechanisms of migration. Our framework has shown the ability to make predictions about the occurrence of track turns looking only at the dynamic shape information of a cell. This shows that cell shape does have a quantitatively measurable relationship with migration, and that our framework has the potential to investigate it. Beyond, cell migration, we expect that our shape explorer software package will enable the analysis of shape changes during other biological processes such as differentiation, infection and other pathological changes, and to discover molecular players that control cell morphology and the dynamics of cell morphology changes.</p>
</sec>
</sec>
<sec id="sec013">
<title>Availability and future directions</title>
<p>The code and documentation are available in the supporting information files (<xref ref-type="supplementary-material" rid="pcbi.1013864.s001">S1 Data</xref>) and at <ext-link ext-link-type="uri" xlink:href="https://github.com/cmcb-warwick/ShapeSpaceExplorer" xlink:type="simple">https://github.com/cmcb-warwick/ShapeSpaceExplorer</ext-link>. The documentation pages can be directly accessed at <ext-link ext-link-type="uri" xlink:href="https://cmcb-warwick.github.io/ShapeSpaceExplorer/getting_started/" xlink:type="simple">https://cmcb-warwick.github.io/ShapeSpaceExplorer/getting_started/</ext-link>. The raw image data used for this study have been deposited with Zenodo under DOI: 10.5281/zenodo.14998398 and the processed data at DOI 10.5281/zenodo.14999395. Warwick’s Computing and Advanced Microscopy Development Unit (CAMDU) will maintain the software and ensure that it is compatible with future versions of MATLAB. Contact details for users are provided on the github pages.</p>
<p>The ShapeSpaceExplorer software and the proof-of-principle that we can predict cell behaviour from cell shape changes opens up possibilities for future developments. For example, the analysis of shape space trajectories can be extended with tools to partition and classify trajectories into phases of persistent directional changes, confined diffusion (i.e. periods of minimal shape changes) and diffusive motion. Switch rates and relative time spent in these phases can be calculated for different treatments or perturbations. Further, detailed flow analysis to determine the most likely next shape from any given prior shape or sequence of shapes, might provide interesting new insights. The combined analysis of real space trajectories and shape changes would be a powerful approach to automatically classify different mechanisms of cell turning and ask how speed and directionality of cell migration correlate with morphology - potentially making it possible to predict some aspects of cell migration from still images. This should be possible with reasonable certainty in the same way as we can tell from a photograph of a person whether they were standing still, walking or running at that moment in time. Additional information, such as the total intensity or an intensity profile of a fluorescence marker within the analysed cells, could be included. Such markers could either label cytoskeletal components to further understand the relationship of cell morphology and cell migration with the underlying changes in the cytoskeleton, detect cell cycle state to understand possible changes in cell morphology and migration during G1 versus G2 phase, or any protein of interest to understand its dosage-dependent effect on cell behaviour. Additional options in the software could include reflection as permissible transformation during BAM. This would be of interest when cells turning left or right is not of interest, but outlines of objects viewed from different sides need to be robustly identified as similar. Further, an extension to interactively train Hidden Markov Models to analyse and classify user-defined shape change sequences could be included.</p>
</sec>
<sec id="sec014" sec-type="supplementary-material">
<title>Supporting information</title>
<supplementary-material id="pcbi.1013864.s001" mimetype="application/x-7z-compressed" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.s001" xlink:type="simple">
<label>S1 Data</label>
<caption>
<title>Source code.</title>
<p>Zip archive including complete ShapeSpaceExplorer source code and documentation. All MATLAB scripts tested with R2022b and R2024b on Windows 10.</p>
<p>(7Z)</p>
</caption>
</supplementary-material>
<supplementary-material id="pcbi.1013864.s002" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.s002" xlink:type="simple">
<label>S1 Fig</label>
<caption>
<title>BAM and diffusion map embedding of 2D shape dataset.</title>
<p>a-d: Diffusion map of &gt;1000 standard shapes (<ext-link ext-link-type="uri" xlink:href="https://github.com/2dshapesstructure" xlink:type="simple">https://github.com/2dshapesstructure</ext-link>), colour-coded by hierarchical clustering with 1st and 2nd diffusion coordinates plotted in a and b, and 3rd and 4th diffusion coordinate plotted in c and d. Exemplars plotted in their respective position in shape space in b and d. e: The Euclidean distance in shape space is calculated for 3 different shape classes (bone, cup and elephant) both to every other shape in the dataset (left) and shapes with same classification (right). Note that BAM does not include reflection and therefore, mirror images of the same shape - unless symmetrical - fall into separate groups such as left and right view of an elephant or a cups with handle curving out from top left or right.</p>
<p>(TIF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pcbi.1013864.s003" mimetype="application/pdf" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.s003" xlink:type="simple">
<label>S1 Text</label>
<caption>
<title>Supplementary methods.</title>
<p>(PDF)</p>
</caption>
</supplementary-material>
</sec>
</body>
<back>
<ref-list>
<title>References</title>
<ref id="pcbi.1013864.ref001"><label>1</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Moseley</surname> <given-names>JB</given-names></name>, <name name-style="western"><surname>Mayeux</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Paoletti</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Nurse</surname> <given-names>P</given-names></name>. <article-title>A spatial gradient coordinates cell size and mitotic entry in fission yeast</article-title>. <source>Nature.</source> <year>2009</year>;<volume>459</volume>(<issue>7248</issue>):<fpage>857</fpage>–<lpage>60</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1038/nature08074" xlink:type="simple">10.1038/nature08074</ext-link></comment> <object-id pub-id-type="pmid">19474789</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref002"><label>2</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Theisen</surname> <given-names>U</given-names></name>, <name name-style="western"><surname>Straube</surname> <given-names>E</given-names></name>, <name name-style="western"><surname>Straube</surname> <given-names>A</given-names></name>. <article-title>Directional persistence of migrating cells requires Kif1C-mediated stabilization of trailing adhesions</article-title>. <source>Dev Cell.</source> <year>2012</year>;<volume>23</volume>(<issue>6</issue>):<fpage>1153</fpage>–<lpage>66</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.devcel.2012.11.005" xlink:type="simple">10.1016/j.devcel.2012.11.005</ext-link></comment> <object-id pub-id-type="pmid">23237952</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref003"><label>3</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bakal</surname> <given-names>C</given-names></name>, <name name-style="western"><surname>Aach</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Church</surname> <given-names>G</given-names></name>, <name name-style="western"><surname>Perrimon</surname> <given-names>N</given-names></name>. <article-title>Quantitative morphological signatures define local signaling networks regulating cell morphology</article-title>. <source>Science.</source> <year>2007</year>;<volume>316</volume>(<issue>5832</issue>):<fpage>1753</fpage>–<lpage>6</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1126/science.1140324" xlink:type="simple">10.1126/science.1140324</ext-link></comment> <object-id pub-id-type="pmid">17588932</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref004"><label>4</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Shim</surname> <given-names>S-H</given-names></name>, <name name-style="western"><surname>Xia</surname> <given-names>C</given-names></name>, <name name-style="western"><surname>Zhong</surname> <given-names>G</given-names></name>, <name name-style="western"><surname>Babcock</surname> <given-names>HP</given-names></name>, <name name-style="western"><surname>Vaughan</surname> <given-names>JC</given-names></name>, <name name-style="western"><surname>Huang</surname> <given-names>B</given-names></name>, <etal>et al</etal>. <article-title>Super-resolution fluorescence imaging of organelles in live cells with photoswitchable membrane probes</article-title>. <source>Proc Natl Acad Sci U S A.</source> <year>2012</year>;<volume>109</volume>(<issue>35</issue>):<fpage>13978</fpage>–<lpage>83</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1073/pnas.1201882109" xlink:type="simple">10.1073/pnas.1201882109</ext-link></comment> <object-id pub-id-type="pmid">22891300</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref005"><label>5</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Keren</surname> <given-names>K</given-names></name>, <name name-style="western"><surname>Pincus</surname> <given-names>Z</given-names></name>, <name name-style="western"><surname>Allen</surname> <given-names>GM</given-names></name>, <name name-style="western"><surname>Barnhart</surname> <given-names>EL</given-names></name>, <name name-style="western"><surname>Marriott</surname> <given-names>G</given-names></name>, <name name-style="western"><surname>Mogilner</surname> <given-names>A</given-names></name>, <etal>et al</etal>. <article-title>Mechanism of shape determination in motile cells</article-title>. <source>Nature.</source> <year>2008</year>;<volume>453</volume>(<issue>7194</issue>):<fpage>475</fpage>–<lpage>80</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1038/nature06952" xlink:type="simple">10.1038/nature06952</ext-link></comment> <object-id pub-id-type="pmid">18497816</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref006"><label>6</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Medyukhina</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Blickensdorf</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Cseresnyés</surname> <given-names>Z</given-names></name>, <name name-style="western"><surname>Ruef</surname> <given-names>N</given-names></name>, <name name-style="western"><surname>Stein</surname> <given-names>JV</given-names></name>, <name name-style="western"><surname>Figge</surname> <given-names>MT</given-names></name>. <article-title>Dynamic spherical harmonics approach for shape classification of migrating cells</article-title>. <source>Sci Rep.</source> <year>2020</year>;<volume>10</volume>(<issue>1</issue>):<fpage>6072</fpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1038/s41598-020-62997-7" xlink:type="simple">10.1038/s41598-020-62997-7</ext-link></comment> <object-id pub-id-type="pmid">32269257</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref007"><label>7</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Kołodziej</surname> <given-names>T</given-names></name>, <name name-style="western"><surname>Mielnicka</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Dziob</surname> <given-names>D</given-names></name>, <name name-style="western"><surname>Chojnacka</surname> <given-names>AK</given-names></name>, <name name-style="western"><surname>Rawski</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Mazurkiewicz</surname> <given-names>J</given-names></name>, <etal>et al</etal>. <article-title>Morphomigrational description as a new approach connecting cell’s migration with its morphology</article-title>. <source>Sci Rep.</source> <year>2023</year>;<volume>13</volume>(<issue>1</issue>):<fpage>11006</fpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1038/s41598-023-35827-9" xlink:type="simple">10.1038/s41598-023-35827-9</ext-link></comment> <object-id pub-id-type="pmid">37419901</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref008"><label>8</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Al-Thelaya</surname> <given-names>K</given-names></name>, <name name-style="western"><surname>Agus</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Gilal</surname> <given-names>NU</given-names></name>, <name name-style="western"><surname>Yang</surname> <given-names>Y</given-names></name>, <name name-style="western"><surname>Pintore</surname> <given-names>G</given-names></name>, <name name-style="western"><surname>Gobbetti</surname> <given-names>E</given-names></name>, <etal>et al</etal>. <article-title>InShaDe: invariant shape descriptors for visual 2D and 3D cellular and nuclear shape analysis and classification</article-title>. <source>Computers &amp; Graphics.</source> <year>2021</year>;<volume>98</volume>:<fpage>105</fpage>–<lpage>25</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.cag.2021.04.037" xlink:type="simple">10.1016/j.cag.2021.04.037</ext-link></comment></mixed-citation></ref>
<ref id="pcbi.1013864.ref009"><label>9</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Sánchez-Corrales</surname> <given-names>YE</given-names></name>, <name name-style="western"><surname>Hartley</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>van Rooij</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Marée</surname> <given-names>AFM</given-names></name>, <name name-style="western"><surname>Grieneisen</surname> <given-names>VA</given-names></name>. <article-title>Morphometrics of complex cell shapes: lobe contribution elliptic Fourier analysis (LOCO-EFA)</article-title>. <source>Development.</source> <year>2018</year>;<volume>145</volume>(<issue>6</issue>):dev156778. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1242/dev.156778" xlink:type="simple">10.1242/dev.156778</ext-link></comment> <object-id pub-id-type="pmid">29444894</object-id></mixed-citation></ref>
<ref id="pcbi.1013864.ref010"><label>10</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Coifman</surname> <given-names>RR</given-names></name>, <name name-style="western"><surname>Lafon</surname> <given-names>S</given-names></name>. <article-title>Diffusion maps</article-title>. <source>Applied and Computational Harmonic Analysis.</source> <year>2006</year>;<volume>21</volume>(<issue>1</issue>):<fpage>5</fpage>–<lpage>30</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.acha.2006.04.006" xlink:type="simple">10.1016/j.acha.2006.04.006</ext-link></comment></mixed-citation></ref>
<ref id="pcbi.1013864.ref011"><label>11</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Comaniciu</surname> <given-names>D</given-names></name>, <name name-style="western"><surname>Meer</surname> <given-names>P</given-names></name>. <article-title>Mean shift: a robust approach toward feature space analysis</article-title>. <source>IEEE Trans Pattern Anal Machine Intell.</source> <year>2002</year>;<volume>24</volume>(<issue>5</issue>):<fpage>603</fpage>–<lpage>19</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/34.1000236" xlink:type="simple">10.1109/34.1000236</ext-link></comment></mixed-citation></ref>
<ref id="pcbi.1013864.ref012"><label>12</label><mixed-citation publication-type="book" xlink:type="simple"><name name-style="western"><surname>Schclar</surname> <given-names>A</given-names></name>. <chapter-title>A diffusion framework for dimensionality reduction</chapter-title>. <source>Soft computing for knowledge discovery and data mining</source>. <publisher-name>Springer US</publisher-name>; <year>2008</year>. p. <fpage>315</fpage>–<lpage>25</lpage>. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/978-0-387-69935-6_13" xlink:type="simple">https://doi.org/10.1007/978-0-387-69935-6_13</ext-link></mixed-citation></ref>
<ref id="pcbi.1013864.ref013"><label>13</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Jefferyes</surname> <given-names>SDR</given-names></name>, <name name-style="western"><surname>Epstein</surname> <given-names>DBA</given-names></name>, <name name-style="western"><surname>Straube</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Rajpoot</surname> <given-names>NM</given-names></name>. <article-title>A novel framework for exploratory analysis of highly variable morphology of migrating epithelial cells</article-title>. <source>Annu Int Conf IEEE Eng Med Biol Soc.</source> <year>2013</year>;<volume>2013</volume>:<fpage>3463</fpage>–<lpage>6</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/EMBC.2013.6610287" xlink:type="simple">10.1109/EMBC.2013.6610287</ext-link></comment> <object-id pub-id-type="pmid">24110474</object-id></mixed-citation></ref>
</ref-list>
</back>
<sub-article article-type="aggregated-review-documents" id="pcbi.1013864.r001" specific-use="decision-letter">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pcbi.1013864.r001</article-id>
<title-group>
<article-title>Decision Letter 0</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name name-style="western"><surname>Vavylonis</surname>
<given-names>Dimitrios</given-names>
</name>
<role>Section Editor</role>
</contrib>
<contrib contrib-type="author">
<name name-style="western"><surname>Liu</surname>
<given-names>Jian</given-names>
</name>
<role>Academic Editor</role>
</contrib>
</contrib-group>
<permissions>
<copyright-year>2026</copyright-year>
<copyright-holder>Vavylonis, Liu</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p></license>
</permissions>
<related-object document-id="10.1371/journal.pcbi.1013864" document-id-type="doi" document-type="article" id="rel-obj001" link-type="peer-reviewed-article"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>0</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p><named-content content-type="letter-date">6 Oct 2025</named-content></p>
<p>PCOMPBIOL-D-25-01631</p>
<p>ShapeSpaceExplorer: Analysis of morphological transitions in migrating cells using similarity-based shape space mapping</p>
<p>PLOS Computational Biology</p>
<p>Dear Dr. Straube,</p>
<p>Thank you for submitting your manuscript to PLOS Computational Biology. After careful consideration, we feel that it has merit but does not fully meet PLOS Computational Biology's publication criteria as it currently stands.  Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.  </p>
<p>Please submit your revised manuscript within 30 days Dec 06 2025 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at <email xlink:type="simple">ploscompbiol@plos.org</email>. When you're ready to submit your revision, log on to <ext-link ext-link-type="uri" xlink:href="https://www.editorialmanager.com/pcompbiol/" xlink:type="simple">https://www.editorialmanager.com/pcompbiol/</ext-link> and select the 'Submissions Needing Revision' folder to locate your manuscript file.</p>
<p>Please include the following items when submitting your revised manuscript:</p>
<p>* A rebuttal letter that responds to each point raised by the editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'. This file does not need to include responses to formatting updates and technical items listed in the 'Journal Requirements' section below.</p>
<p>* A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.</p>
<p>* An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.</p>
<p>If you would like to make changes to your financial disclosure, competing interests statement, or data availability statement, please make these updates within the submission form at the time of resubmission. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.</p>
<p>We look forward to receiving your revised manuscript.</p>
<p>Kind regards,</p>
<p>Jian Liu</p>
<p>Academic Editor</p>
<p>PLOS Computational Biology</p>
<p>Dimitrios Vavylonis</p>
<p>Section Editor</p>
<p>PLOS Computational Biology</p>
<p><bold>Journal Requirements:</bold></p>
<p>If the reviewer comments include a recommendation to cite specific previously published works, please review and evaluate these publications to determine whether they are relevant and should be cited. There is no requirement to cite these works unless the editor has indicated otherwise.</p>
<p>1) We ask that a manuscript source file is provided at Revision. Please upload your manuscript file as a .doc, .docx, .rtf or .tex. If you are providing a .tex file, please upload it under the item type u2018LaTeX Source Fileu2019 and leave your .pdf version as the item type u2018Manuscriptu2019.</p>
<p>2) Please provide an Author Summary. This should appear in your manuscript between the Abstract (if applicable) and the Introduction, and should be 150-200 words long. The aim should be to make your findings accessible to a wide audience that includes both scientists and non-scientists. Sample summaries can be found on our website under Submission Guidelines:</p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/ploscompbiol/s/submission-guidelines#loc-parts-of-a-submission" xlink:type="simple">https://journals.plos.org/ploscompbiol/s/submission-guidelines#loc-parts-of-a-submission</ext-link></p>
<p>3) Please upload all main figures as separate Figure files in .tif or .eps format. For more information about how to convert and format your figure files please see our guidelines: </p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/ploscompbiol/s/figures" xlink:type="simple">https://journals.plos.org/ploscompbiol/s/figures</ext-link></p>
<p>4) We have noticed that you have uploaded Supporting Information files, but you have not included a list of legends. Please add a full list of legends for your Supporting Information files after the references list.</p>
<p>5) Please amend your detailed Financial Disclosure statement. This is published with the article. It must therefore be completed in full sentences and contain the exact wording you wish to be published.</p>
<p>1) State the initials, alongside each funding source, of each author to receive each grant. For example: "This work was supported by the National Institutes of Health (####### to AM; ###### to CJ) and the National Science Foundation (###### to AM)."</p>
<p>2) State what role the funders took in the study. If the funders had no role in your study, please state: "The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript."</p>
<p>3) If any authors received a salary from any of your funders, please state which authors and which funders..</p>
<p>If you did not receive any funding for this study, please simply state: u201cThe authors received no specific funding for this work.u201d</p>
<p>6) Your current Financial Disclosure states, "Yes ↳ Please add funding details. SJ was funded by the Warwick Systems Biology Doctoral Training Centre supported by EPSRC and BBSRC. RG was funded by a postdoctoral fellowship from the Institute of Advanced Study, University of Warwick. MMA and ES were funded by the Lister Institute of Preventive Medicine award to AS. LC is funded by the University of Warwick. AS is a Wellcome Investigator (224563/Z/21/Z). None of the funders played any role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. ↳ Please select the country of your main research funder (please select carefully as in some cases this is used in fee calculation). UNITED KINGDOM - GB".</p>
<p>However, your funding information on the submission form indicates an alternative arrangement for the funders. </p>
<p>Please indicate by return email the full and correct funding information for your study and confirm the order in which funding contributions should appear. Please be sure to indicate whether the funders played any role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript.</p>
<p>7) Kindly revise your competing statement in the online submission form to align with the journal's style guidelines: 'The authors declare that there are no competing interests.'</p>
<p><bold>Reviewers' comments:</bold></p>
<p>Reviewer's Responses to Questions</p>
<p><bold>Comments to the Authors:</bold></p>
<p><bold>Please note here if the review is uploaded as an attachment.</bold></p>
<p>Reviewer #1: This work involves quantitative representation of shape distributions of migrating mesenchymal cells and analysis of cell morphology during motility. It uses the diffusion maps technique to compare pairs of cell shapes. Using this framework, the authors describe a relationship between cell shape dynamics and cell migration. The need for such a tool to extract shape features of migrating cells is well acknowledged. In that regard, the work presents a software that can be used in experiments to assess cell shape changes in response to perturbations. I think it can also be applied to static cells as well.</p>
<p>Having said that, it is not easy to read - it would help if the methods were described in greater detail. I am not sure if I can clearly see how this work establishes the claimed relationship between cell shape dynamics and migration. The manuscript appears written for readers already well-versed in machine learning terminology, which makes it difficult for those without such a background to follow. It took me quite some time to go through, and I still could not fully understand all aspects. Unfortunately, I do not have access to MATLAB, so I could not see the software in action, which would probably have given me a fairer impression of the work. Some specific comments are below</p>
<p>1. Which types of images does this work on? Does it work for all 2D images, say bright field microscopy, fluorescence microscopy, or also for 3D confocal etc.?</p>
<p>2. Even though the definition of the shape similarity using BAM is quite intuitive, it will be good to show how good the BAM metric is by showing it on some standardized contours. This will also help justify the use of the optimal number of nodes (512).</p>
<p>3. The context of the use of the Diffusion Map embedding is not clear to me. Is it to represent all the cell shape data (from a sequence of cell images) in a low dimensional form? For example, it will help if it is explicitly states what does x and y represent in equation (3) in this context.</p>
<p>4. Given the closed loop nature of the cell contours, why can’t Fourier series representation be used as a low-dimensional representation?</p>
<p>5. I also could not understand the motivation behind the calculation of pairwise alignment for all shapes (lines 115-116).</p>
<p>6. Shouldn’t similarity be calculated between consecutive shapes?</p>
<p>7. It is not clear to me what exactly is meant by the “shape space splicing” (line 129).</p>
<p>8. Table 1 describes the physical characteristics of the cell along with diffusion map coordinates. It will help the reader if this is discussed in little more detail. How do we relate the DC_i’s with physical characteristics?</p>
<p>9. Equation (4) calculates Pearson correlation. Are all the curves independent? Will the independence or dependence affect the correlation analysis?</p>
<p>10. I am afraid I do not find it apparent from the figure “and significantly fewer highly elongated cells with long tails were present in the siKif1C dataset compared to control cells”. (line 219)</p>
<p>11. In Fig. 3, are untreated cells same as control?</p>
<p>12. Again, I do not follow the detection of “cell turning”. Can’t that be seen directly from the trajectory itself?</p>
<p>In Fig. 4 (a), it will help if the direction of the flow can be highlighted.</p>
<p>Reviewer #2: In this manuscript, the authors present a software (MATLAB-based Graphical User Interface) for the analysis of cell shapes and migration types. The method of analysis is based on a similarity matrix that quantifies the overall proximity of uniformly distributed points representing individual cell outlines. The software utilizes an effective optimization approach to calculating the similarity matrix, diffusion map embedding, unsupervised hierarchical clustering, and even a Hidden Markov Model approach for characterization of state transitions during cell migration. The manuscript is well-structured, written with care, and substantiated with comparative analyses and applications to experimental data. This software will be of interest to both experimental and computational cell biologists. I do not have any major concerns, but I do have some suggestions to consider during the revision stage.</p>
<p>Minor concerns/suggestions:</p>
<p>1. Throughout the paper, the authors provide their choices of some parameters (usually 4 or 5) without much justification. For example, “distinct cell IDs for each continuous track segment of at least 5 frames length”, “5 eigenvectors were found to be sufficient”, “we have selected K = 5 for accurate and fast assignment”. I don’t have anything against number 5, and I understand that some choices need to be made, but at least in some cases, the authors could run analyses with 4, 5, and 6 to show that the results don’t change or that the accuracy plateaus. This could go to Supplemental Materials. Alternatively, if the software provides an easy way to adjust these parameters and interactively see results, the authors should clearly state that in the text where they make such choices.</p>
<p>2. In Figure 4a, the authors illustrated cell tracks in shape space coordinates. I wonder if it is possible to classify these tracks (based on the characteristics of the tracks in the real and/or shape space). The authors opted to consider in detail only cell turning, which is interesting and valuable, but some unsupervised clustering or cell trajectories could also be important for broader applications, at least as the first step.</p>
<p>3. On Page 11, near the end of the first paragraph, there seems to be an incomplete sentence: “We find that more than 61% of predicted turn points were within the 5 closest points (±10 min) to the true turn, while only 14% of the control points were (Fig. 6g).”</p>
<p>4. The last section is titled “Availability and Future Directions”, but I can’t find anything about “Future Directions”. Either the title or the text needs to be corrected.</p>
<p>**********</p>
<p><bold>Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?</bold></p>
<p>The <ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/ploscompbiol/s/materials-and-software-sharing" xlink:type="simple">PLOS Data policy</ext-link> requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.</p>
<p>Reviewer #1: Yes</p>
<p>Reviewer #2: Yes</p>
<p>**********</p>
<p>PLOS authors have the option to publish the peer review history of their article (<ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/ploscompbiol/s/editorial-and-peer-review-process#loc-peer-review-history" xlink:type="simple">what does this mean?</ext-link>). If published, this will include your full peer review and any attached files.</p>
<p>If you choose “no”, your identity will remain anonymous but your review may still be made public.</p>
<p><bold>Do you want your identity to be public for this peer review?</bold> For information about this choice, including consent withdrawal, please see our <ext-link ext-link-type="uri" xlink:href="https://www.plos.org/privacy-policy" xlink:type="simple">Privacy Policy</ext-link>.</p>
<p>Reviewer #1: No</p>
<p>Reviewer #2: No</p>
<p><bold>Figure resubmission:</bold></p>
<p>While revising your submission, we strongly recommend that you use PLOS’s NAAS tool (<ext-link ext-link-type="uri" xlink:href="https://ngplosjournals.pagemajik.ai/artanalysis" xlink:type="simple">https://ngplosjournals.pagemajik.ai/artanalysis</ext-link>) to test your figure files. NAAS can convert your figure files to the TIFF file type and meet basic requirements (such as print size, resolution), or provide you with a report on issues that do not meet our requirements and that NAAS cannot fix.</p>
<p>After uploading your figures to PLOS’s NAAS tool - <ext-link ext-link-type="uri" xlink:href="https://ngplosjournals.pagemajik.ai/artanalysis" xlink:type="simple">https://ngplosjournals.pagemajik.ai/artanalysis</ext-link>, NAAS will process the files provided and display the results in the "Uploaded Files" section of the page as the processing is complete. If the uploaded figures meet our requirements (or NAAS is able to fix the files to meet our requirements), the figure will be marked as "fixed" above. If NAAS is unable to fix the files, a red "failed" label will appear above. When NAAS has confirmed that the figure files meet our requirements, please download the file via the download option, and include these NAAS processed figure files when submitting your revised manuscript.</p>
<p><bold>Reproducibility:</bold></p>
<p>To enhance the reproducibility of your results, we recommend that authors of applicable studies deposit laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option to publish peer-reviewed clinical study protocols. Read more information on sharing protocols at <ext-link ext-link-type="uri" xlink:href="https://plos.org/protocols?utm_medium=editorial-email&amp;utm_source=authorletters&amp;utm_campaign=protocols" xlink:type="simple">https://plos.org/protocols?utm_medium=editorial-email&amp;utm_source=authorletters&amp;utm_campaign=protocols</ext-link></p>
</body>
</sub-article>
<sub-article article-type="author-comment" id="pcbi.1013864.r002">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pcbi.1013864.r002</article-id>
<title-group>
<article-title>Author response to Decision Letter 1</article-title>
</title-group>
<related-object document-id="10.1371/journal.pcbi.1013864" document-id-type="doi" document-type="peer-reviewed-article" id="rel-obj002" link-type="rebutted-decision-letter" object-id="10.1371/journal.pcbi.1013864.r001" object-id-type="doi" object-type="decision-letter"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>1</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p><named-content content-type="author-response-date">8 Dec 2025</named-content></p>
<supplementary-material id="pcbi.1013864.s004" mimetype="application/pdf" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1013864.s004" xlink:type="simple">
<label>Attachment</label>
<caption>
<p>Submitted filename: <named-content content-type="submitted-filename">PLOSCompBiol_Rebuttal_Nov2025_v2.pdf</named-content></p>
</caption>
</supplementary-material>
</body>
</sub-article>
<sub-article article-type="editor-report" id="pcbi.1013864.r003" specific-use="decision-letter">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pcbi.1013864.r003</article-id>
<title-group>
<article-title>Decision Letter 1</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name name-style="western"><surname>Vavylonis</surname>
<given-names>Dimitrios</given-names>
</name>
<role>Section Editor</role>
</contrib>
<contrib contrib-type="author">
<name name-style="western"><surname>Liu</surname>
<given-names>Jian</given-names>
</name>
<role>Academic Editor</role>
</contrib>
</contrib-group>
<permissions>
<copyright-year>2026</copyright-year>
<copyright-holder>Vavylonis, Liu</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p></license>
</permissions>
<related-object document-id="10.1371/journal.pcbi.1013864" document-id-type="doi" document-type="article" id="rel-obj003" link-type="peer-reviewed-article"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>1</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p><named-content content-type="letter-date">22 Dec 2025</named-content></p>
<p>Dear Prof Dr Straube,</p>
<p>We are pleased to inform you that your manuscript 'ShapeSpaceExplorer: Analysis of morphological transitions in migrating cells using similarity-based shape space mapping' has been provisionally accepted for publication in PLOS Computational Biology.</p>
<p>Before your manuscript can be formally accepted you will need to complete some formatting changes, which you will receive in a follow up email. A member of our team will be in touch with a set of requests.</p>
<p>Please note that your manuscript will not be scheduled for publication until you have made the required changes, so a swift response is appreciated.</p>
<p>IMPORTANT: The editorial review process is now complete. PLOS will only permit corrections to spelling, formatting or significant scientific errors from this point onwards. Requests for major changes, or any which affect the scientific understanding of your work, will cause delays to the publication date of your manuscript.</p>
<p>Should you, your institution's press office or the journal office choose to press release your paper, you will automatically be opted out of early publication. We ask that you notify us now if you or your institution is planning to press release the article. All press must be co-ordinated with PLOS.</p>
<p>Thank you again for supporting Open Access publishing; we are looking forward to publishing your work in PLOS Computational Biology. </p>
<p>Best regards,</p>
<p>Jian Liu</p>
<p>Academic Editor</p>
<p>PLOS Computational Biology</p>
<p>Dimitrios Vavylonis</p>
<p>Section Editor</p>
<p>PLOS Computational Biology</p>
<p>***********************************************************</p>
</body>
</sub-article>
<sub-article article-type="editor-report" id="pcbi.1013864.r004" specific-use="acceptance-letter">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pcbi.1013864.r004</article-id>
<title-group>
<article-title>Acceptance letter</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name name-style="western"><surname>Vavylonis</surname>
<given-names>Dimitrios</given-names>
</name>
<role>Section Editor</role>
</contrib>
<contrib contrib-type="author">
<name name-style="western"><surname>Liu</surname>
<given-names>Jian</given-names>
</name>
<role>Academic Editor</role>
</contrib>
</contrib-group>
<permissions>
<copyright-year>2026</copyright-year>
<copyright-holder>Vavylonis, Liu</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p></license>
</permissions>
<related-object document-id="10.1371/journal.pcbi.1013864" document-id-type="doi" document-type="article" id="rel-obj004" link-type="peer-reviewed-article"/>
</front-stub>
<body>
<p>PCOMPBIOL-D-25-01631R1</p>
<p>ShapeSpaceExplorer: Analysis of morphological transitions in migrating cells using similarity-based shape space mapping</p>
<p>Dear Dr Straube,</p>
<p>I am pleased to inform you that your manuscript has been formally accepted for publication in PLOS Computational Biology. Your manuscript is now with our production department and you will be notified of the publication date in due course.</p>
<p>The corresponding author will soon be receiving a typeset proof for review, to ensure errors have not been introduced during production. Please review the PDF proof of your manuscript carefully, as this is the last chance to correct any errors. Please note that major changes, or those which affect the scientific understanding of the work, will likely cause delays to the publication date of your manuscript.</p>
<p>Soon after your final files are uploaded, unless you have opted out, the early version of your manuscript will be published online. The date of the early version will be your article's publication date. The final article will be published to the same URL, and all versions of the paper will be accessible to readers.</p>
<p>For Research, Software, and Methods articles, you will receive an invoice from PLOS for your publication fee after your manuscript has reached the completed accept phase. If you receive an email requesting payment before acceptance or for any other service, this may be a phishing scheme. Learn how to identify phishing emails and protect your accounts at <ext-link ext-link-type="uri" xlink:href="https://explore.plos.org/phishing" xlink:type="simple">https://explore.plos.org/phishing</ext-link>.</p>
<p>Thank you again for supporting PLOS Computational Biology and open-access publishing. We are looking forward to publishing your work!</p>
<p>With kind regards,</p>
<p>Anita Estes</p>
<p>PLOS Computational Biology | Carlyle House, Carlyle Road, Cambridge CB4 3DN | United Kingdom <email xlink:type="simple">ploscompbiol@plos.org</email> | Phone +44 (0) 1223-442824 | ploscompbiol.org | @PLOSCompBiol</p>
</body>
</sub-article>
</article>