cap-validator
Overview
Python tool for validating H5AD AnnData files before uploading to the Cell Annotation Platform. The same validation code is used in Cell Annotation Platform following requirements from the CAP-AnnData schema published here.
Full documentation could be found in the GitHub Wiki
Features
- ✨ Validates all upload requirements and returns results at once
- 🚀 RAM efficient
- 🧬 Provides a full list of supported ENSEMBL gene IDs for Homo sapiens and Mus musculus
Installation
pip install -U cap-upload-validator
Usage
Basic usage
from cap_upload_validator import UploadValidator
h5ad_path = "path_to.h5ad"
uv = UploadValidator(h5ad_path)
uv.validate()
CLI interface
$ capval tmp/tmp.h5ad
CapMultiException:
AnnDataMissingEmbeddings:
The embedding is missing or is incorrectly named: embeddings must be a [n_cells x 2]
numpy array saved with the prefix X_, for example: X_tsne, X_pca or X_umap.
AnnDataMisingObsColumns:
Required obs column(s) missing: file must contain
'assay', 'disease', 'organism' and 'tissue' fields with valid values.
For details visit:
https://github.com/cellannotation/cap-validator/wiki/Validation-Errors
$ capval --help
usage: capval [-h] adata_path
CLI tool to validate an AnnData H5AD file before uploading to the Cell Annotation Platform.
The validator will raise CAP-specific errors if the file does not follow the CAP AnnData Schema,
as defined in:
https://github.com/cellannotation/cell-annotation-schema/blob/main/docs/cap_anndata_schema.md
Full documentation, including a list of possible validation errors, is available at:
https://github.com/cellannotation/cap-validator/wiki
Usage Example:
`capval path/to/anndata.h5ad`
positional arguments:
adata_path Path to the AnnData h5ad file.
optional arguments:
-h, --help show this help message and exit
License
Metadata
Release files for cap_upload_validator 1.7.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 | |
|---|---|---|---|
| cap_upload_validator-1.7.0.tar.gz | 2.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cap_upload_validator-1.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.0 MB
Release files / cap_upload_validator-1.7.0.tar.gz
| Download URL | cap_upload_validator-1.7.0.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cdc9da65e84deecd4833e472bb126d0deed7521a34406b7c46c468a488bf9b1a
|
|
BLAKE2b-256 checksum How to use checksums |
a12a64aa929ea1dbadd10e8788e1391fb6d5e038593892c841c17d272da53b23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.0
|
Release files / cap_upload_validator-1.7.0-py3-none-any.whl
| Download URL | cap_upload_validator-1.7.0-py3-none-any.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c49ad0882fd5568a8d93c0ffc024edcc6e82fc2f564551e381592f1a5ffcc31e
|
|
BLAKE2b-256 checksum How to use checksums |
102c75edf09e04416b37389241f5a55d9aaf92b12e677cfd0ff4c7355a9a70c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.0
|