czbiohub-sf / automated-protein-purifier

Contains Python application and czpurifier package for automated protein purification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ProteinPurifier

Introduction

This repository contains the Python application and custom czpurifier package that have been designed for automated protein purification by the CZ Biohub - SF Bioengineering team. All utilities support Python 3.7.

This is a public snapshot of the automated protein purification repo as described in our 2023 preprint PREPRINT LINK.

Maintenance of this repo is the responsibility of Robert Puccinelli. Please direct any communication to Robert Puccinelli via creation of an issue.

This source describes Open Hardware, which is licensed under the CERN-OHL-W v2.

Electronics hardware is described in the supplementary information of the publication.

CAD designs are provided in Onshape.

Software is licensed under BSD 3-Clause.

Copyright Chan Zuckerberg Biohub - San Francisco 2023.

Contents

Classes

/hardware/

  • HardwareController - Interfaces with hardware peripherals
  • PurifierHardwareSetup - Configures hardware peripherals according to specified file
  • PumpController - Base class for a pump controller
  • PumpControllerTic - Valve controller for use with a Tic stepper driver
  • RotaryController - Base class for a rotary valve
  • RotaryControllerTic - Rotary valve for use with a Tic stepper driver
  • ValveController - Base class for a valve controller
  • ValveControllerI2c - Valve controller utilizing the I2C protocol
  • MockHardwareSetup - Interface with the hardware simulators
  • RotaryControllerSim - Mocks the responses of the Rotary valve
  • PumpControllerSim - Mocks the responses of the pump
  • ValveControllerSim - Mocks the responses of the valve controller
  • FractionCollectorSim - Mocks the responses of the fraction collector
  • TicStepperSim - Mocks the responses of the tic stepper driver

/middleware/

  • ControllerInterface - Links user interface to communication interface
  • DeviceInterface - Links communication interface to hardware interface
  • SimulatorInterface - Inherits DeviceInterface and links communication interface to simulator

/ui/

  • UICommands - Command wrappers to simplify controller-device communication
  • GUI_Controller - Controls communication between controller interface and GUI, connects to simulator, holds common GUI classes and accesses default parameters
  • FractionsSelected - Controls and maintains the fraction and flow columns selected for each step
  • Ui_MainWindow - The UI initialization and backend code for the window that pops up first
  • Ui_Purification - UI and backend for the basic purification window
  • Ui_CustomProtocol - UI and backend for custom protocol window
  • AddStep - UI and backend for each step added on the custom protocol window
  • Ui_FractionColumn - UI to show the fraction or flow selected
  • Ui_BuffersWindow - UI to display the buffers needed and adjust calibration
  • RunPurification - Runs the purifier using the inputs from the purification window
  • RunCustomProtocol - Runs the purifier using the inputs from the custom protocol window

Data Files

  • purification_parameters.json - Holds the default parameters for gui window and default calibration settings

Scripts

  • device_setup.py - Called by Linux service to activate purifier software
  • test_script.py - Example purification protocol

Installation and Use

Installing Module

  1. Install PyQt5 globally (required to access pyqt5 package on the virtual environment). Run the command:

    sudo apt-get update
    sudo apt-get install python3-pyqt5

  2. Create and/or activate a virtual environment in a convenient location with Python3
  3. Download / clone this repository
  4. Navigate to the base of the repository
  5. Install setuptools (pip install setuptools)
  6. Install module (pip install .)

NOTE: Developers may want to install the module with pip install -e . so that changes they make to the module are immediately reflected when subsequently imported.

Installing without cloning the repository

  1. Install PyQt5 globally (required to access pyqt5 package on the virtual environment). Run the command:

    sudo apt-get update
    sudo apt-get install python3-pyqt5

  2. Create and/or activate a virtual environment in a convenient location with Python3
  3. Install module (pip install git+https://github.com/czbiohub-sf/automated-protein-purifier)

NOTE: It is unclear that module can be tested for completeness if directly installed.

Updating Module from Repository

  1. Pull changes from remote repository
  2. Activate virtual environment with previous install
  3. Navigate to the module directory
  4. Update module (pip install . --upgrade)

Updating Without Cloning

  1. Update module (pip install git+https://github.com/czbiohub-sf/automated-protein-purifier --upgrade)

Using GUI

  1. If running the GUI for the first time, locate automated-protein-purifier/czpurifier/ui/purification_parameters.json and update the PURIFIER_IP to refer to the ip of the device
  2. Go to the base of the directory and run:

    python3 czpurifier/ui/main_window_gui.py

Using Module

  1. Edit files to include import czpurifier or a variant such as from czpurifier import {class_name}
  2. Activate virtual environment with module installed
  3. Execute python script or application

Usage

The user interface was designed to simplify operation and strips away most arguments needed to operate the machine. A list of methods and basic examples of how to use them can be found at: https://github.com/czbiohub-sf/automated-protein-purifier/tree/master/czpurifier/ui

Scripts that have been used for set up, clean up or various experiments can be found at: https://github.com/czbiohub-sf/automated-protein-purifier/tree/master/scripts

About

Contains Python application and czpurifier package for automated protein purification

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 99.9%Language:Shell 0.1%Language:Makefile 0.0%