samplesheet-parser 0.3.3__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/.gitignore +2 -0
- samplesheet_parser-1.0.0/.pre-commit-config.yaml +29 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/CHANGELOG.md +92 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/PKG-INFO +77 -3
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/README.md +75 -1
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/pyproject.toml +5 -2
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/__init__.py +6 -2
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/cli.py +174 -62
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/factory.py +6 -4
- samplesheet_parser-1.0.0/samplesheet_parser/index_utils.py +185 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/merger.py +96 -63
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/validators.py +9 -1
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_cli.py +155 -0
- samplesheet_parser-1.0.0/tests/test_index_utils.py +163 -0
- samplesheet_parser-1.0.0/tests/test_validators/__init__.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_validators/test_validators.py +57 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/.github/workflows/ci.yml +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/.github/workflows/copilot-instructions.md +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/.zenodo.json +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/CITATION.cff +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/CONTRIBUTING.md +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/LICENSE +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/demo_merger.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/parse_examples.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/ProjectAlpha_SampleSheet.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/ProjectBeta_SampleSheet.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/ProjectDelta_SampleSheet_collision.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/ProjectGamma_SampleSheet.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/README.md +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/combined_clean.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/combined_collision_forced.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/combined_mixed_formats.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v1_dual_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v1_multi_lane.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v1_single_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v1_with_lab_qc_settings.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v1_with_manifests.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_nextseq_single_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_novaseq_x_dual_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_with_cloud_settings.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_with_index_umi.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_with_pipeline_settings.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/examples/sample_sheets/v2_with_read_umi.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/images/samplesheet_parser_arch_v03.png +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/images/samplesheet_parser_overview.png +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/converter.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/diff.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/enums.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/parsers/__init__.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/parsers/v1.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/parsers/v2.py +0 -0
- /samplesheet_parser-0.3.3/tests/__init__.py → /samplesheet_parser-1.0.0/samplesheet_parser/py.typed +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/samplesheet_parser/writer.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/scripts/demo_converter.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/scripts/demo_diff.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/scripts/demo_writer.py +0 -0
- {samplesheet_parser-0.3.3/tests/test_parsers → samplesheet_parser-1.0.0/tests}/__init__.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/conftest.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/fixtures/SampleSheet_v1_dual_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/fixtures/SampleSheet_v2_dual_index.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/fixtures/SampleSheet_v2_modified.csv +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_converter.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_diff.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_factory.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_merger.py +0 -0
- {samplesheet_parser-0.3.3/tests/test_validators → samplesheet_parser-1.0.0/tests/test_parsers}/__init__.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_parsers/test_v1.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_parsers/test_v2.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_validators/test_hamming.py +0 -0
- {samplesheet_parser-0.3.3 → samplesheet_parser-1.0.0}/tests/test_writer.py +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/psf/black
|
|
13
|
+
rev: 24.10.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: black
|
|
16
|
+
language_version: python3.12
|
|
17
|
+
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.9.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff
|
|
22
|
+
args: [--fix]
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
+
rev: v1.13.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: mypy
|
|
28
|
+
additional_dependencies: [loguru, typer]
|
|
29
|
+
args: [--ignore-missing-imports]
|
|
@@ -6,6 +6,98 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [1.0.0] - 2026-04-05
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`py.typed` marker** — package now ships inline type information per
|
|
14
|
+
PEP 561, enabling mypy and pyright to type-check downstream code without
|
|
15
|
+
extra configuration.
|
|
16
|
+
|
|
17
|
+
- **`InstrumentPlatform` and `UMILocation` enums exported** — both were
|
|
18
|
+
already defined in `enums.py` but not part of the public API. They are now
|
|
19
|
+
importable directly from the top-level package and listed in `__all__`.
|
|
20
|
+
|
|
21
|
+
- **`.pre-commit-config.yaml`** — pre-commit hook configuration included in
|
|
22
|
+
the repository (black, ruff with `--fix`, mypy, and standard file hygiene
|
|
23
|
+
hooks) so contributors get the same checks locally that CI enforces.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- `SampleSheetFactory.create_parser()` now returns a typed local variable
|
|
28
|
+
instead of `self.parser`, resolving a mypy `return-value` error caused by
|
|
29
|
+
the instance attribute being typed as `SampleSheetV1 | SampleSheetV2 | None`.
|
|
30
|
+
|
|
31
|
+
- `SampleSheetMerger._parse_all()` guards against `factory.version` being
|
|
32
|
+
`None` before accessing `.value`, fixing a potential `AttributeError` on
|
|
33
|
+
unexpected parse paths.
|
|
34
|
+
|
|
35
|
+
- Removed redundant `type: ignore[assignment]` suppressions in
|
|
36
|
+
`index_utils.py` that were no longer needed under strict mypy.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Development status classifier updated from `3 - Alpha` to
|
|
41
|
+
`5 - Production/Stable`.
|
|
42
|
+
|
|
43
|
+
- Ruff config adds `[tool.ruff.lint.per-file-ignores]` to suppress E402 for
|
|
44
|
+
`samplesheet_parser/__init__.py`, where the version-detection block
|
|
45
|
+
intentionally precedes the package re-exports.
|
|
46
|
+
|
|
47
|
+
- **Stability guarantee** — `1.0.0` marks the first stable release.
|
|
48
|
+
The public API (all names in `__init__.__all__`) is now subject to
|
|
49
|
+
semantic versioning: breaking changes will not be made without a major
|
|
50
|
+
version bump.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [0.3.4] - 2026-04-04
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- **`samplesheet info` CLI command** — prints a concise summary of any V1 or
|
|
59
|
+
V2 sample sheet (format, sample count, lanes, index type, read lengths,
|
|
60
|
+
adapters, experiment name, instrument). Supports `--format json` for
|
|
61
|
+
machine-readable output; exits 0 on success, 2 on unreadable files.
|
|
62
|
+
|
|
63
|
+
- **Configurable Hamming distance threshold** — `SampleSheetValidator.validate()`
|
|
64
|
+
now accepts a `min_hamming_distance` keyword argument (default: 3) so labs
|
|
65
|
+
using longer indexes can enforce stricter thresholds without changing the
|
|
66
|
+
module-level constant.
|
|
67
|
+
- `SampleSheetMerger` accepts the same parameter in `__init__()` and applies
|
|
68
|
+
it to both the intra-sheet and cross-sheet Hamming checks as well as the
|
|
69
|
+
post-merge validation step.
|
|
70
|
+
- `samplesheet validate` exposes `--min-hamming N` (must be ≥ 1; exits 2 on
|
|
71
|
+
invalid input). The JSON output includes `min_hamming_distance` for
|
|
72
|
+
auditability.
|
|
73
|
+
|
|
74
|
+
- **`normalize_index_lengths()` utility** — normalizes index sequence lengths
|
|
75
|
+
across a list of sample dicts (output of `sheet.samples()`) to a consistent
|
|
76
|
+
length before merging sheets with mixed-length indexes.
|
|
77
|
+
- `strategy="trim"` — trims all indexes to the shortest sequence length.
|
|
78
|
+
- `strategy="pad"` — pads shorter indexes to the longest length using `"N"`
|
|
79
|
+
wildcard characters (supported by BCLConvert ≥ 3.9 and bcl2fastq ≥ 2.20).
|
|
80
|
+
- Auto-detects V1-style (`index`/`index2`) and V2-style (`Index`/`Index2`)
|
|
81
|
+
field names; explicit `index1_key`/`index2_key` overrides supported.
|
|
82
|
+
- Exported from the top-level package as `normalize_index_lengths`.
|
|
83
|
+
|
|
84
|
+
- **CI / pre-commit integration guide** in README — GitHub Actions workflow
|
|
85
|
+
and pre-commit hook configuration for automatic sample sheet validation on
|
|
86
|
+
every commit or pull request that touches a `SampleSheet.csv`.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- `_detect_key()` in `index_utils` now selects the key with at least one
|
|
91
|
+
non-empty value before falling back to key presence, preventing silent
|
|
92
|
+
normalization skip when a key exists but all its values are `None` or `""`.
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- `--min-hamming` CLI option default and help text are now derived from the
|
|
97
|
+
`MIN_HAMMING_DISTANCE` constant in `validators.py` to prevent drift.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
9
101
|
## [0.3.3] - 2026-03-13
|
|
10
102
|
|
|
11
103
|
### Documentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: samplesheet-parser
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Format-agnostic parser for Illumina SampleSheet.csv files — supports IEM V1 and BCLConvert V2
|
|
5
5
|
Project-URL: Homepage, https://github.com/chaitanyakasaraneni/samplesheet-parser
|
|
6
6
|
Project-URL: Documentation, https://illumina-samplesheet.readthedocs.io
|
|
@@ -28,7 +28,7 @@ License: Apache License
|
|
|
28
28
|
limitations under the License.
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
Keywords: bcl2fastq,bclconvert,bioinformatics,demultiplexing,genomics,illumina,ngs,samplesheet,sequencing
|
|
31
|
-
Classifier: Development Status ::
|
|
31
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
32
32
|
Classifier: Intended Audience :: Developers
|
|
33
33
|
Classifier: Intended Audience :: Science/Research
|
|
34
34
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -557,6 +557,80 @@ sheet.get_read_structure() # → ReadStructure dataclass
|
|
|
557
557
|
|
|
558
558
|
---
|
|
559
559
|
|
|
560
|
+
## CI / pre-commit integration
|
|
561
|
+
|
|
562
|
+
The CLI exits with meaningful codes (`0` = clean, `1` = issues, `2` = error), making it easy to wire into automated pipelines.
|
|
563
|
+
|
|
564
|
+
### GitHub Actions
|
|
565
|
+
|
|
566
|
+
Add a validation step to any workflow that touches `SampleSheet.csv`:
|
|
567
|
+
|
|
568
|
+
```yaml
|
|
569
|
+
# .github/workflows/validate-samplesheet.yml
|
|
570
|
+
name: Validate SampleSheet
|
|
571
|
+
|
|
572
|
+
on:
|
|
573
|
+
push:
|
|
574
|
+
paths:
|
|
575
|
+
- '**/SampleSheet.csv'
|
|
576
|
+
pull_request:
|
|
577
|
+
paths:
|
|
578
|
+
- '**/SampleSheet.csv'
|
|
579
|
+
|
|
580
|
+
jobs:
|
|
581
|
+
validate:
|
|
582
|
+
runs-on: ubuntu-latest
|
|
583
|
+
steps:
|
|
584
|
+
- uses: actions/checkout@v4
|
|
585
|
+
|
|
586
|
+
- uses: actions/setup-python@v5
|
|
587
|
+
with:
|
|
588
|
+
python-version: '3.12'
|
|
589
|
+
|
|
590
|
+
- run: pip install "samplesheet-parser[cli]"
|
|
591
|
+
|
|
592
|
+
- name: Validate SampleSheet
|
|
593
|
+
run: samplesheet validate SampleSheet.csv --format json
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### pre-commit hook
|
|
597
|
+
|
|
598
|
+
Gate commits that touch any `SampleSheet.csv` in the repository:
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
# .pre-commit-config.yaml
|
|
602
|
+
repos:
|
|
603
|
+
- repo: local
|
|
604
|
+
hooks:
|
|
605
|
+
- id: samplesheet-validate
|
|
606
|
+
name: Validate SampleSheet.csv
|
|
607
|
+
entry: samplesheet validate
|
|
608
|
+
language: python
|
|
609
|
+
additional_dependencies: ["samplesheet-parser[cli]"]
|
|
610
|
+
files: SampleSheet\.csv$
|
|
611
|
+
pass_filenames: true
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
Install and run once to verify:
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
pip install pre-commit
|
|
618
|
+
pre-commit install
|
|
619
|
+
pre-commit run samplesheet-validate --all-files
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
### Stricter Hamming distance in CI
|
|
623
|
+
|
|
624
|
+
If your lab uses longer indexes (10 bp+), raise the minimum Hamming distance threshold to catch borderline cases earlier:
|
|
625
|
+
|
|
626
|
+
```bash
|
|
627
|
+
samplesheet validate SampleSheet.csv --min-hamming 4
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
This is especially useful in CI where you want to prevent runs that will likely fail demultiplexing.
|
|
631
|
+
|
|
632
|
+
---
|
|
633
|
+
|
|
560
634
|
## Contributing
|
|
561
635
|
|
|
562
636
|
```bash
|
|
@@ -585,7 +659,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full local testing guide and PR c
|
|
|
585
659
|
title = {samplesheet-parser: Format-agnostic parser for Illumina SampleSheet.csv},
|
|
586
660
|
year = {2026},
|
|
587
661
|
url = {https://github.com/chaitanyakasaraneni/samplesheet-parser},
|
|
588
|
-
version = {0.
|
|
662
|
+
version = {1.0.0}
|
|
589
663
|
}
|
|
590
664
|
```
|
|
591
665
|
|
|
@@ -506,6 +506,80 @@ sheet.get_read_structure() # → ReadStructure dataclass
|
|
|
506
506
|
|
|
507
507
|
---
|
|
508
508
|
|
|
509
|
+
## CI / pre-commit integration
|
|
510
|
+
|
|
511
|
+
The CLI exits with meaningful codes (`0` = clean, `1` = issues, `2` = error), making it easy to wire into automated pipelines.
|
|
512
|
+
|
|
513
|
+
### GitHub Actions
|
|
514
|
+
|
|
515
|
+
Add a validation step to any workflow that touches `SampleSheet.csv`:
|
|
516
|
+
|
|
517
|
+
```yaml
|
|
518
|
+
# .github/workflows/validate-samplesheet.yml
|
|
519
|
+
name: Validate SampleSheet
|
|
520
|
+
|
|
521
|
+
on:
|
|
522
|
+
push:
|
|
523
|
+
paths:
|
|
524
|
+
- '**/SampleSheet.csv'
|
|
525
|
+
pull_request:
|
|
526
|
+
paths:
|
|
527
|
+
- '**/SampleSheet.csv'
|
|
528
|
+
|
|
529
|
+
jobs:
|
|
530
|
+
validate:
|
|
531
|
+
runs-on: ubuntu-latest
|
|
532
|
+
steps:
|
|
533
|
+
- uses: actions/checkout@v4
|
|
534
|
+
|
|
535
|
+
- uses: actions/setup-python@v5
|
|
536
|
+
with:
|
|
537
|
+
python-version: '3.12'
|
|
538
|
+
|
|
539
|
+
- run: pip install "samplesheet-parser[cli]"
|
|
540
|
+
|
|
541
|
+
- name: Validate SampleSheet
|
|
542
|
+
run: samplesheet validate SampleSheet.csv --format json
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### pre-commit hook
|
|
546
|
+
|
|
547
|
+
Gate commits that touch any `SampleSheet.csv` in the repository:
|
|
548
|
+
|
|
549
|
+
```yaml
|
|
550
|
+
# .pre-commit-config.yaml
|
|
551
|
+
repos:
|
|
552
|
+
- repo: local
|
|
553
|
+
hooks:
|
|
554
|
+
- id: samplesheet-validate
|
|
555
|
+
name: Validate SampleSheet.csv
|
|
556
|
+
entry: samplesheet validate
|
|
557
|
+
language: python
|
|
558
|
+
additional_dependencies: ["samplesheet-parser[cli]"]
|
|
559
|
+
files: SampleSheet\.csv$
|
|
560
|
+
pass_filenames: true
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Install and run once to verify:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
pip install pre-commit
|
|
567
|
+
pre-commit install
|
|
568
|
+
pre-commit run samplesheet-validate --all-files
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Stricter Hamming distance in CI
|
|
572
|
+
|
|
573
|
+
If your lab uses longer indexes (10 bp+), raise the minimum Hamming distance threshold to catch borderline cases earlier:
|
|
574
|
+
|
|
575
|
+
```bash
|
|
576
|
+
samplesheet validate SampleSheet.csv --min-hamming 4
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
This is especially useful in CI where you want to prevent runs that will likely fail demultiplexing.
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
509
583
|
## Contributing
|
|
510
584
|
|
|
511
585
|
```bash
|
|
@@ -534,7 +608,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full local testing guide and PR c
|
|
|
534
608
|
title = {samplesheet-parser: Format-agnostic parser for Illumina SampleSheet.csv},
|
|
535
609
|
year = {2026},
|
|
536
610
|
url = {https://github.com/chaitanyakasaraneni/samplesheet-parser},
|
|
537
|
-
version = {0.
|
|
611
|
+
version = {1.0.0}
|
|
538
612
|
}
|
|
539
613
|
```
|
|
540
614
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "samplesheet-parser"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "1.0.0"
|
|
8
8
|
description = "Format-agnostic parser for Illumina SampleSheet.csv files — supports IEM V1 and BCLConvert V2"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -14,7 +14,7 @@ keywords = [
|
|
|
14
14
|
"genomics", "bioinformatics", "demultiplexing", "sequencing",
|
|
15
15
|
]
|
|
16
16
|
classifiers = [
|
|
17
|
-
"Development Status ::
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
18
|
"Intended Audience :: Science/Research",
|
|
19
19
|
"Intended Audience :: Developers",
|
|
20
20
|
"License :: OSI Approved :: Apache Software License",
|
|
@@ -62,6 +62,9 @@ target-version = "py312"
|
|
|
62
62
|
[tool.ruff.lint]
|
|
63
63
|
select = ["E", "F", "I", "W", "UP", "B"]
|
|
64
64
|
|
|
65
|
+
[tool.ruff.lint.per-file-ignores]
|
|
66
|
+
"samplesheet_parser/__init__.py" = ["E402"]
|
|
67
|
+
|
|
65
68
|
[tool.mypy]
|
|
66
69
|
python_version = "3.12"
|
|
67
70
|
strict = true
|
|
@@ -29,13 +29,14 @@ except PackageNotFoundError:
|
|
|
29
29
|
__version__ = "0.1.0-dev"
|
|
30
30
|
|
|
31
31
|
__author__ = "Chaitanya Kasaraneni"
|
|
32
|
-
__email__
|
|
32
|
+
__email__ = "kc.kasaraneni@gmail.com"
|
|
33
33
|
__license__ = "Apache 2.0"
|
|
34
34
|
|
|
35
35
|
from samplesheet_parser.converter import SampleSheetConverter
|
|
36
36
|
from samplesheet_parser.diff import DiffResult, SampleSheetDiff
|
|
37
|
-
from samplesheet_parser.enums import IndexType, SampleSheetVersion
|
|
37
|
+
from samplesheet_parser.enums import IndexType, InstrumentPlatform, SampleSheetVersion, UMILocation
|
|
38
38
|
from samplesheet_parser.factory import SampleSheetFactory
|
|
39
|
+
from samplesheet_parser.index_utils import normalize_index_lengths
|
|
39
40
|
from samplesheet_parser.merger import MergeResult, SampleSheetMerger
|
|
40
41
|
from samplesheet_parser.parsers.v1 import SampleSheetV1
|
|
41
42
|
from samplesheet_parser.parsers.v2 import SampleSheetV2
|
|
@@ -48,6 +49,8 @@ __all__ = [
|
|
|
48
49
|
"SampleSheetFactory",
|
|
49
50
|
"SampleSheetVersion",
|
|
50
51
|
"IndexType",
|
|
52
|
+
"InstrumentPlatform",
|
|
53
|
+
"UMILocation",
|
|
51
54
|
"SampleSheetValidator",
|
|
52
55
|
"ValidationResult",
|
|
53
56
|
"SampleSheetConverter",
|
|
@@ -56,5 +59,6 @@ __all__ = [
|
|
|
56
59
|
"SampleSheetWriter",
|
|
57
60
|
"SampleSheetMerger",
|
|
58
61
|
"MergeResult",
|
|
62
|
+
"normalize_index_lengths",
|
|
59
63
|
"__version__",
|
|
60
64
|
]
|