Python tool for validating H5AD AnnData files before uploading to the Cell Annotation Platform.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cap_upload_validator-1.5.2.tar.gz.
File metadata
- Download URL: cap_upload_validator-1.5.2.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a08fafe14e448b794c7ed8b2c0de7239b7895a3401d7cf623b5d0c1e4e8d088d
|
|
| MD5 |
76e371b8cd8fb9690f76784531497540
|
|
| BLAKE2b-256 |
6c70c3ca5d8b26e208fe200f73732ba3dcf02e9455af1a9850c0a49a9560221a
|
File details
Details for the file cap_upload_validator-1.5.2-py3-none-any.whl.
File metadata
- Download URL: cap_upload_validator-1.5.2-py3-none-any.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6ceb6b00714a51827d2363216f4844e44039accf0333d20354c4d0c93f370f
|
|
| MD5 |
a935cb3218f3bc8b27eb276763f1760e
|
|
| BLAKE2b-256 |
f017ebda29acdb8929846c0291e2f12f5c1d9dfa5d1fbc730bfe3b1dc343fcd1
|