El Sheeto
I/O and models in type-annotated Python for NGS sample sheets: Illumina (v1) and Aviti
- Python: 3.13+
- License: MIT
- Documentation at ReadTheDocs
Features
Parsing & Reading:
- Parse Illumina sample sheets (v1 format)
- Parse Aviti sample sheets (Sequencing Manifests) with composite index support
- Type-safe Pydantic models with comprehensive validation
- Three-stage parsing architecture for robust error handling
Modification & Writing:
- Modify existing sample sheets with fluent API
- Add, remove, and update samples, run values, and settings
- Builder pattern for complex sheet construction
- Export modified sheets back to CSV format
- Round-trip compatibility: parse → modify → write → parse
Key Capabilities:
- Composite index handling for Aviti (e.g.,
ATCG+GCTA) - Case-insensitive field access
- Immutable data structures with modification methods
- 100% type coverage with mypy/pyright
- Comprehensive test suite
Quick Start
Parsing Sample Sheets
from elsheeto import parse_aviti, parse_illumina_v1
# Parse Aviti sample sheet
aviti_sheet = parse_aviti("sequencing_manifest.csv")
print(f"Found {len(aviti_sheet.samples)} samples")
# Parse Illumina v1 sample sheet
illumina_sheet = parse_illumina_v1("sample_sheet.csv")
print(f"Found {len(illumina_sheet.samples)} samples")
Modifying Sample Sheets
from elsheeto import parse_aviti, write_aviti_to_file
from elsheeto.models.aviti import AvitiSample
# Load and modify existing sheet
sheet = parse_aviti("experiment.csv")
modified_sheet = (sheet
.with_sample_added(AvitiSample(
sample_name="New_Sample",
index1="ATCGATCG",
project="MyProject"
))
.with_sample_modified("Old_Sample", project="UpdatedProject")
.with_run_value_added("ModificationDate", "2024-01-15")
)
# Write back to file
write_aviti_to_file(modified_sheet, "modified_experiment.csv")
Creating New Sample Sheets
from elsheeto.models.aviti import AvitiSheetBuilder, AvitiSample
# Build new sheet from scratch
sheet = (AvitiSheetBuilder()
.add_run_value("Experiment", "EXP_001")
.add_setting("ReadLength", "150")
.add_sample(AvitiSample(
sample_name="Sample_1",
index1="ATCGATCG",
project="MyProject"
))
.build())
# Export to CSV
csv_content = sheet.to_csv()
Examples
See the examples/ directory for comprehensive usage examples:
examples/quick_start_aviti.py- Simple introduction to key featuresexamples/modify_aviti.py- Complete modification guide with advanced patternsexamples/read_aviti.py- Parsing and analysis examplesexamples/read_illumina_v1.py- Illumina v1 parsing examples
Installation
pip install elsheeto
Documentation
Complete documentation is available at ReadTheDocs, including:
Contributing
Contributions are welcome! Please see the development setup in the repository for details on:
- Type safety requirements (100% mypy/pyright compliance)
- Testing with pytest
- Code formatting with black and ruff
- Three-stage parsing architecture
Metadata
Release files for elsheeto 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elsheeto-0.3.2.tar.gz | 29.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elsheeto-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.6 kB
Release files / elsheeto-0.3.2.tar.gz
| Download URL | elsheeto-0.3.2.tar.gz |
|---|---|
| Size | 29.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17d197a7df5deb62d521761c0965907b73c4bb79fb41d32215850ceef7f34fec
|
|
BLAKE2b-256 checksum How to use checksums |
7cf4dc23c13c1498d2929e4dafddfb66e8db37edd12dc7da6284be335e3d7351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / elsheeto-0.3.2-py3-none-any.whl
| Download URL | elsheeto-0.3.2-py3-none-any.whl |
|---|---|
| Size | 38.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03ecbacd5372efe30f0e6cb30c383d7c3411ac53312d37efaf32e4ff0ce3e7ba
|
|
BLAKE2b-256 checksum How to use checksums |
51695c2e4fff9b97bd84a37db3e3e4a7044f4b0d0a95b03e0ea15c402d59acaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|