MetaSheet-Guard
Documentation website | Repository
MetaSheet-Guard performs experimental-design-aware quality control for sequencing analysis sample sheets. It targets the analysis-preparation stage: after FASTQ generation or public metadata collection, but before running workflows such as Nextflow, Snakemake, nf-core/rnaseq, or custom RNA-seq pipelines.
The current package includes CSV/TSV reading, bundled YAML schemas, validation,
repair provenance, workflow export, JSON/HTML reports, and a
metasheet-guard CLI.
Scope
MetaSheet-Guard is being built to model relationships between biological samples, sequencing runs, lanes, FASTQ files, replicates, conditions, batches, and downstream workflow requirements. The current release is intentionally small and currently supports these first-pass capabilities:
- required columns
- duplicate column names
- schema-defined column aliases
- empty values in required columns
- sample ID and metadata consistency checks
- FASTQ path, extension, gzip, pair, and duplication checks
- sample/run/lane relationship checks
- batch-condition and related design-risk checks
- safe repair with
changes.jsonprovenance - nf-core/rnaseq, Snakemake, canonical CSV, and DESeq2 design exports
- bundled
generic-ngsandbulk-rnaseqschemas
Non-goals
MetaSheet-Guard is not an RNA-seq aligner, quantifier, differential expression tool, SRA downloader, nf-core/fetchngs replacement, nf-schema replacement, Illumina BCL Convert or bcl2fastq SampleSheet validator, single-cell object validator, spatial image validator, or generic CSV validation framework.
Installation
pip install -e ".[dev]"
Quickstart
Validate a broken bulk RNA-seq sample sheet and write a JSON report:
metasheet-guard check examples/broken/missing_required_column.csv \
--schema bulk-rnaseq \
--json report.json
The command exits with status code 1 when blocking validation errors are found.
For the example above, report.json contains a REQUIRED_COLUMN_MISSING issue
because the bulk-rnaseq schema requires a condition column.
Validate a minimal valid example:
metasheet-guard check examples/valid/bulk_rnaseq_paired.csv \
--schema bulk-rnaseq
Repair safe metadata issues and record provenance:
metasheet-guard repair examples/broken/condition_case_mixed.csv \
--schema bulk-rnaseq \
--out clean.csv \
--changes changes.json
Only safe repairs are implemented. Suggested/inference-based repairs are reserved for later milestones and currently fail clearly if requested.
Export a cleaned sheet:
metasheet-guard export examples/valid/bulk_rnaseq_paired.csv \
--target nf-core-rnaseq \
--out nfcore_samplesheet.csv
Python API
from metasheet_guard import read_sheet, validate
sheet = read_sheet("examples/broken/missing_required_column.csv")
result = validate(sheet, schema="bulk-rnaseq")
for issue in result.issues:
print(issue.severity, issue.code, issue.message)
Development
Run tests and linting:
pytest
ruff check .
The project uses src/ packaging, Typer for the command-line interface, PyYAML
for schemas, pytest for tests, and Ruff for linting.
Release files for metasheet-guard 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| metasheet_guard-0.1.0.tar.gz | 30.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| metasheet_guard-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.6 kB
Release files / metasheet_guard-0.1.0.tar.gz
| Download URL | metasheet_guard-0.1.0.tar.gz |
|---|---|
| Size | 30.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a45e11b4e06686f57b37cf504ef87cdcb85ddb2b85abff4942d7529cfcdfd131
|
|
BLAKE2b-256 checksum How to use checksums |
a822fcabd434602f744c7108e041e6a2ef3d8f5055b63c10f434fcb6a79b2278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency logRelease files / metasheet_guard-0.1.0-py3-none-any.whl
| Download URL | metasheet_guard-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edf941002879245141473daaadf9f9c877374089a4304a50dfa54099edbf59a1
|
|
BLAKE2b-256 checksum How to use checksums |
8c4d172377ca58c6fb70cbf1482e683bd34fbbe045215abae8006b6c6da26dc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency log