PyHTE
A python package for high-throughput experiments and laboratory automation.
Features
- Compositions of solvent volumes and solute amounts, with mixed solvents and dissolved solids
- Labware: containers and plates with capacities and dead volumes
- Plans that are simulated before dispensing, and designs that create them, e.g. titrations
- Devices: protocols for the UK Robotics D2 dispenser, measurements from the JASCO V-750 spectrophotometer
- Records of what was actually dispensed, and the state derived from them
- Storage of plates, plans, runs and measurements in an SQLite (or other SQL) database
Installation
python3 -m pip install pyhte
The package is published as pyhte and imported as hte.
Optional RDKit support (molecule objects on substances):
python3 -m pip install "pyhte[chem]"
Development tools (including pytest, ruff and pyright, and sphinx) from a clone of the local package:
python3 -m pip install -e .[chem] --group dev
Usage
Volumes are given in L, amounts in mol, concentrations in mol/L, masses in g and molar masses in g/mol.
The factors in hte.units convert from and to these base units: multiply to enter a value (250*uL), divide to read
one (state[well].volume/uL).
Containers and plates describe the labware only. What they contain is a LabState: an immutable snapshot that maps
containers to their Composition. A Plan starts from an initial state and never modifies it; plan.simulate()
derives the final state and checks every transfer on the way.
from hte import Composition, Container, LabState, Plate, PlateType, Substance, TitrationDesign, TitrationSeries
from hte.units import mL, mM
water, dmso = Substance("water"), Substance("DMSO")
analyte, titrant = Substance("analyte"), Substance("titrant")
analyte_stock = Container(capacity=10*mL, label="analyte")
titrant_stock = Container(capacity=10*mL, label="titrant")
solvent = Container(capacity=50*mL, label="solvent")
plate = Plate.create(PlateType.well_24())
initial = LabState.create(
{
analyte_stock: Composition.solution(dmso, 5*mL, {analyte: 10*mM}),
titrant_stock: Composition.solution(water, 5*mL, {titrant: 20*mM}),
solvent: Composition.solution(water, 30*mL),
},
plates=[plate], # registers the (empty) wells
)
design = TitrationDesign(
series=TitrationSeries(
analyte_concentration=[1*mM] * plate.size,
titrant_concentration=[i * 4*mM / (plate.size - 1) for i in range(plate.size)],
),
analyte=analyte_stock,
titrant=titrant_stock,
solvent=solvent,
volume=1*mL,
plate=plate,
)
plan = design.create_plan(initial)
final = plan.simulate() # raises at the first transfer that is not possible
well = plate["B3"]
print(final[well].concentration(titrant)/mM) # 1.391...
print(final[well].solvent_fractions) # 10 % DMSO, 90 % water
print(initial[well].is_empty) # True: the initial state is unchanged
The documentation covers dispensing with the D2, recording runs, importing measurements from the V-750 and saving to a database; see the tutorial for a complete walk-through.
Invalid input and violated domain rules raise hte.exceptions.ValidationError, a subclass of both HTEError and
ValueError.
Metadata
Release files for pyhte 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyhte-0.1.1.tar.gz | 46.6 kB | Without provenance | Details for pyhte-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyhte-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pyhte-0.1.1-py3-none-any.whl |
Total release size: 100.2 kB
Release files / pyhte-0.1.1.tar.gz
| Download URL | pyhte-0.1.1.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
accc150b454eb2e9de4b0f5539a80687f87682d9434e0ffe3dde212a9ccd799e
|
|
BLAKE2b-256 checksum How to use checksums |
b1e934a208894e30f1e7728629176b365d3e091d7ccb6e5231eaf9c4ba41afea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / pyhte-0.1.1-py3-none-any.whl
| Download URL | pyhte-0.1.1-py3-none-any.whl |
|---|---|
| Size | 53.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6be9347d0a81b1807b41b402920efba4363488aa5c16c4c915c8d3cc78142912
|
|
BLAKE2b-256 checksum How to use checksums |
d7a52447eff725a4d5bc8ab7c7503b69a8a5495d2df4809d927d36095492a106
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Security for pyhte 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.