Skip to content

This repository contains a Python-based simulation tool for a Paper-Based Analytical Device (μPAD) designed for the point-of-care detection of High-Risk HPV strains (16 & 18). It acts as a "Digital Twin" for wet-lab experiments, modeling the fluid dynamics and reaction kinetics of a Loop-mediated Isothermal Amplification diagnostic test.

Notifications You must be signed in to change notification settings

CreedxAsif/HPV-Paper-Microfluidics-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

HPV-Paper-Microfluidics-Simulator

This repository contains a Python-based simulation tool for a Paper-Based Analytical Device (μPAD) designed for the point-of-care detection of High-Risk HPV strains (16 & 18).
It acts as a "Digital Twin" for wet-lab experiments, modeling the fluid dynamics and reaction kinetics of a Loop-mediated Isothermal Amplification diagnostic test.

Unknown

🎯 What This Code Does

The simulation breaks the diagnostic process into two scientifically accurate phases:

Phase 1: Capillary Flow (The Physics)

  • Model: Simulates fluid transport through porous media (Whatman No. 1 / Nitrocellulose) using the Lucas-Washburn Equation:
    $$L = S \sqrt{t}$$ (Where $L$ is distance, $S$ is sorptivity, and $t$ is time).
  • Visual: Visualizes the sample (DNA + Master Mix) traveling from a single inlet, splitting at a trident junction, and wetting three distinct reaction zones.

Phase 2: Reaction Kinetics (The Biochemistry)

  • Model: Simulates the time-dependent colorimetric change of a LAMP reaction at 65°C.
  • Logic:
    • Channel 1 (Left): Specific for HPV16.
    • Channel 2 (Center): Specific for HPV18.
    • Channel 3 (Right): Internal Control ($\beta$-Actin).
  • Outcome: The detection zones transition from Purple (Negative) to Green (Positive) only if the specific target DNA is present and sufficient heating time is applied.

🛠️ Installation & Usage

Option 1: Run in Browser (Recommended)

Because this tool uses ipywidgets for interactivity, it runs best in a Jupyter environment like Google Colab.

  1. Copy the code from simulation.py.
  2. Open a new Google Colab Notebook.
  3. Paste the code into a cell and run it (Shift + Enter).

Option 2: Run Locally

  1. Clone the repository:
    git clone [https://github.com/CreedxAsif/HPV-Paper-Microfluidics-Simulator.git](https://github.com/CreedxAsif/HPV-Paper-Microfluidics-Simulator.git)
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Launch Jupyter Notebook:
    jupyter notebook
    
  4. Copy the code into a notebook cell and execute.

🧪 Simulation Controls Sample Input: Select the type of DNA sample (e.g., "HPV16 Positive", "Water Control").

Flow Slider: Drag to simulate the passage of time (seconds) as fluid wicks up the paper.

Heating Slider: Drag to simulate the incubation period (minutes) required for the LAMP reaction to occur.

🔬 Scientific Context This tool was developed to assist in the design of low-cost microfluidic devices for cervical cancer screening in resource-limited settings. By simulating flow path lengths and reaction times, we can optimize the geometry of the paper chip before fabrication.

Created by Mohamed Asif Shajahan

About

This repository contains a Python-based simulation tool for a Paper-Based Analytical Device (μPAD) designed for the point-of-care detection of High-Risk HPV strains (16 & 18). It acts as a "Digital Twin" for wet-lab experiments, modeling the fluid dynamics and reaction kinetics of a Loop-mediated Isothermal Amplification diagnostic test.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages