Closed kevinschaper closed 3 weeks ago
It's a little bit rough, but I think this might be a good first half of addressing #138 (I also want to add support for choosing to write or not write to extra kgx files)
Can you try checking this branch out @hrshdhgd and playing with this command?
koza split input-file.tsv field1,field2 --output-dir my-output-dir
@kevinschaper , I installed this branch as a package (after uninstalling koza) and I got : No such command 'split'.
koza --help
yields
Usage: koza [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ transform Transform a source file │
│ validate Validate a source file │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Happy to make changes later, but I'm going to bring this in so that I can hook it up to the ncbi gene ingest
Adds a koza split cli command that breaks up an existing kgx node or edge file based on values in specified fields, example:
koza split monarch-kg_nodes.tsv category, in_taxon_label --output-dir ./split-nodes