Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Shannon Quinn - Python for Public Health: Building Statistical Models of Ciliary Motion

Shannon Quinn - Python for Public Health: Building Statistical Models of Ciliary Motion

Cilia, microscopic hairs lining nearly every cell surface in your body, play a major role in developmental and sinopulmonary health. As such, deriving quantitative properties of their motion is compelling for both clinical and research purposes. Here we demonstrate a computational pipeline built entirely in Python for analyzing ciliary motion using a variety of machine learning techniques.



PyCon 2016

May 29, 2016


  1. Python For Public Health: Building Statistical Models Of Ciliary Motion

    Shannon Quinn University of Georgia PyCon 2016
  2. Part I: Cilia and their pathologies

  3. What are cilia? Scale bars: 10µm

  4. Why do we care about cilia? u Clinical u Ciliopathies

    u Association with congenital heart disease u Developmental u Nodal flow u Left-right asymmetry
  5. How do we diagnose ciliopathies? Cheap, fast, inaccurate Slow, expensive,

    accurate (?) Measure nasal nitric oxide (NO) levels Electron microscopy to search for structural defects Ciliary beat frequency (CBF) computation Manual ciliary beat pattern analysis “Gold standard”
  6. What is our goal? u Input: high-speed video of ciliary

    biopsy u Output: quantitative properties of observed motion Curly!
  7. Part II: Quantitative features of ciliary motion

  8. Strategy for quantifying motion

  9. From videos to features

  10. Features describing motion Scaling (zoom) Deformation (biaxial shear) Rotation (curl)

    Not useful in 2D “Novel use of differential image velocity invariants to categorize ciliary motion defects.” Quinn SP, Francis R, Lo C, Chennubhotla CS. Proceedings of the Biomedical Science and Engineering Conference (BSEC) 2011.
  11. What do these features look like? Rotation (rad/s)

  12. How do we represent these features? ~ yt = C~

    xt ~ xt = A1~ xt 1 + A2~ xt 2 + ... + Ad~ xt d Feature vectors!
  13. What can we do with these features? 93% classification accuracy

    Automated identification of abnormal respiratory ciliary motion in nasal biopsies. Quinn SP, Zahid M, Durkin J, Francis R, Lo C, Chennubhotla CS. Science Translational Medicine 2015.
  14. Part III: The Python ecosystem

  15. Collecting data from collaborators 1. Upload to django website 2.

    Annotate manually 3. Save annotations in database using SQLAlchemy
  16. Processing raw video data 1. Videos in AVI format 2.

    Convert to NumPy arrays with OpenCV 3. Compute optical flow with OpenCV 4. Compute rotation with SciPy signal processing filters
  17. Derivation of time series models u …custom code! u scipy.linalg

  18. Classification pipeline u Cross-validation for model fitting and testing using

    scikit-learn u joblib / PySpark for parameter scanning u matplotlib + seaborn / bokeh for visualization
  19. (BONUS ROUND) Part IV: Conclusions and future directions

  20. Conclusions u 93% classification: methods are sound u Dynamic texture

    representation is accurate u Blackbox tool for clinicians u Web front-end + Python middleware + Spark back-end u Upload video -> Get analysis u Assist experts with diagnostics u Expert input u Phenotype annotations, regions of interest
  21. Future directions u Normal / Abnormal is an oversimplification… u

    Unsupervised motion clustering pipeline u Associate specific motion phenotypes with clinical conditions
  22. Thank you! u spq@uga.edu u @SpectralFilter u https://magsol.github.io/