DRMHB / examples /04_add_complete_ground_truth.py
AlejandroGZ's picture
v2.6 dataset
881cb3b
Raw History Blame Contribute Delete
1.2 kB
#!/usr/bin/env python3
"""Enrich an existing H5AD with full annotations without recalculating X or raw arrays."""
from __future__ import annotations
import argparse
from pathlib import Path
from drmhb_workflow import enrich_existing, positive_int
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("source", type=Path, help="Existing package-generated H5AD")
parser.add_argument(
"vibframe", type=Path, help="The original matching VibFrame ZIP/directory"
)
parser.add_argument("output", type=Path)
parser.add_argument("--max-sidecar-mib", type=positive_int, default=512)
parser.add_argument("--overwrite", action="store_true")
args = parser.parse_args()
print("A transactional copy needs about one additional H5AD of free disk space.")
result = enrich_existing(
args.source,
args.vibframe,
args.output,
max_sidecar_mib=args.max_sidecar_mib,
overwrite=args.overwrite,
)
print(f"Created: {result}")
print(
"Source identities must match. Legacy capture_t companions are not retroactively added."
)
if __name__ == "__main__":
main()