File size: 1,288 Bytes
2ad85cb
881cb3b
2ad85cb
 
 
 
 
 
881cb3b
 
70a5538
2ad85cb
881cb3b
 
 
 
 
2ad85cb
881cb3b
2ad85cb
881cb3b
 
 
2ad85cb
881cb3b
2ad85cb
881cb3b
 
2ad85cb
881cb3b
 
 
70a5538
881cb3b
70a5538
2ad85cb
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
"""Materialize the reference EDA features without reopening the VibFrame."""

from __future__ import annotations

import argparse
from pathlib import Path

from drmhb_workflow import add_reference_features, positive_int
from vibframe_anndata import validate_streamed_h5ad


def main() -> None:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("source", type=Path)
    parser.add_argument("output", type=Path)
    parser.add_argument("--block-rows", type=positive_int, default=256)
    parser.add_argument(
        "--features-config", type=Path, help="Optional package-format YAML"
    )
    parser.add_argument("--overwrite", action="store_true")
    args = parser.parse_args()
    output = add_reference_features(
        args.source,
        args.output,
        block_rows=args.block_rows,
        config=args.features_config,
        overwrite=args.overwrite,
    )
    report = validate_streamed_h5ad(output)
    print(f"Created: {output}\nX shape: ({report['n_obs']}, {report['n_vars']})")
    print("Raw coverage and archived-annotation identities are unchanged.")
    print(
        "Published reference: 468 source/machine-scoped columns, not 468 dense fleet-wide variables."
    )


if __name__ == "__main__":
    main()