https://github.com/cardiacmodelling/pcpostprocess
A Python package to run Lei et al. (2019) quality control on patch-clamp time-series data.
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Repository
A Python package to run Lei et al. (2019) quality control on patch-clamp time-series data.
Basic Info
Statistics
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 26
- Releases: 0
Metadata Files
README.md
This repository contains a python package and scripts for handling time-series data from patch-clamp experiments. The package has been tested with data from a SyncroPatch 384, but may be adapted to work with data in other formats. It can also be used to perform quality control (QC) as described in Lei et al. (2019).
This package is tested on Ubuntu with Python 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13.
Getting Started
First clone the repository
sh
git clone git@github.com:CardiacModelling/pcpostprocess
cd pcpostprocess
Create and activate a virtual environment.
sh
python3 -m venv .venv && source .venv/bin/activate
Then install the package with pip.
sh
python3 -m pip install --upgrade pip && python3 -m pip install -e .'[test]'
To run the tests you must first download some test data. Test data is available at cardiac.nottingham.ac.uk/syncropatch_export
sh
wget https://cardiac.nottingham.ac.uk/syncropatch_export/test_data.tar.xz -P tests/
tar xvf tests/test_data.tar.xz -C tests/
rm tests/test_data.tar.xz
Then you can run the tests.
sh
python3 -m unittest
Usage
Running QC and post-processing
Quality control (QC) may be run using the criteria outlined in Rapid Characterization of hERG Channel Kinetics I and Evaluating the predictive accuracy of ion channel models using data from multiple experimental designs. These criteria assume the use of the staircase protocol for quality control, which should be the first and last protocol performed. We also assume the presence of repeats after the addition of an IKr blocker (such as dofetilide).
Prior to performing QC and exporting, an export_config.py file should be added to the root of the data directory. This file (see example_config.py) contains a Python dict (Q2S_DC) specifying the filenames of the protocols used for QC, and names they should be outputted with, as well as a Python dict (D2S) listing the other protocols and names to be used for their output. Additionally, the saveID field specifies the name of the expeirment which appears in the output file names.
```sh $ pcpostprocess runhergqc --help
usage: pcpostprocess runhergqc [-h] [-c NOCPUS] [--outputdir OUTPUTDIR] [-w WELLS [WELLS ...]] [--protocols PROTOCOLS [PROTOCOLS ...]] [--reversalspreadthreshold REVERSALSPREADTHRESHOLD] [--export_failed] [--selectionfile SELECTIONFILE] [--subtracted_only] [--figsize FIGSIZE FIGSIZE] [--debug] [--loglevel LOGLEVEL] [--Erev EREV] datadirectory
positional arguments: data_directory
options: -h, --help show this help message and exit -c NOCPUS, --nocpus NOCPUS Number of workers to spawn in the multiprocessing pool (default: 1) --outputdir OUTPUTDIR path where the output will be saved -w WELLS [WELLS ...], --wells WELLS [WELLS ...] wells to include (default: all) --protocols PROTOCOLS [PROTOCOLS ...] protocols to include (default: all) --reversalspreadthreshold REVERSALSPREADTHRESHOLD The maximum spread in reversal potential (across sweeps) allowed for QC --exportfailed Flag specifying whether to produce full output for those wells failing QC (default: false) --selectionfile SELECTIONFILE File listing wells to be included --figsize FIGSIZE FIGSIZE --debug --loglevel LOGLEVEL --Erev EREV The reversal potential during the experiment ```
Exporting Summary
The summarise_herg_export command produces additionally output after run_herg_qc has been run.
```sh $ pcpostprocess summarisehergexport --help
usage: pcpostprocess summarisehergexport [-h] [--cpus CPUS] [--wells WELLS [WELLS ...]] [--output OUTPUT] [--protocols PROTOCOLS [PROTOCOLS ...]] [-r REVERSAL] [--experimentname EXPERIMENTNAME] [--figsize FIGSIZE FIGSIZE] [--outputall] [--loglevel LOGLEVEL] datadir qcestimatesfile
positional arguments: datadir path to the directory containing the runherg_qc results
options: -h, --help show this help message and exit --cpus CPUS, -c CPUS --wells WELLS [WELLS ...], -w WELLS [WELLS ...] wells to include in the output (default: all) --output OUTPUT, -o OUTPUT path where the output will be saved --protocols PROTOCOLS [PROTOCOLS ...] protocols to include (default: all) -r REVERSAL, --reversal REVERSAL the reversal potential during the experiment --experimentname EXPERIMENTNAME --figsize FIGSIZE FIGSIZE --outputall Flag specifying whether to output all plots (default: false) --loglevel LOG_LEVEL ```
Owner
- Name: Cardiac Modelling
- Login: CardiacModelling
- Kind: organization
- Location: United Kingdom
- Website: https://www.maths.nottingham.ac.uk/plp/pmzgm/
- Repositories: 20
- Profile: https://github.com/CardiacModelling
Codes and Resources from the University of Nottingham's cardiac modelling team
GitHub Events
Total
- Issues event: 30
- Delete event: 9
- Issue comment event: 30
- Push event: 80
- Pull request review comment event: 4
- Pull request event: 20
- Pull request review event: 17
- Create event: 9
Last Year
- Issues event: 30
- Delete event: 9
- Issue comment event: 30
- Push event: 80
- Pull request review comment event: 4
- Pull request event: 20
- Pull request review event: 17
- Create event: 9
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 4
- Total pull requests: 7
- Average time to close issues: 7 months
- Average time to close pull requests: about 1 month
- Total issue authors: 2
- Total pull request authors: 4
- Average comments per issue: 0.5
- Average comments per pull request: 0.86
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Issue authors: 1
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.86
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MichaelClerx (11)
- github-actions[bot] (7)
- hilaryh (3)
- kwabenantim (1)
- chonlei (1)
Pull Request Authors
- joeyshuttleworth (4)
- MichaelClerx (4)
- kwabenantim (2)
- hilaryh (2)
- github-actions[bot] (1)
- anastasia-rk (1)
- mirams (1)
- RomanSyunyaev (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- codecov/codecov-action v1 composite
- actions/checkout v3 composite
- alstr/todo-to-issue-action v4 composite
- jinja2 >=3.1.0
- matplotlib >=3.4
- numpy >=1.21
- openpyxl >=3.1.2
- pandas >=1.3
- regex >=2023.12.25
- scipy >=1.7
- seaborn >=0.12.2