Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add koza split cli command to split up a kgx file based on field values #139

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

kevinschaper
Copy link
Member

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

@kevinschaper kevinschaper requested a review from hrshdhgd July 12, 2024 23:17
@kevinschaper
Copy link
Member Author

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

@hrshdhgd
Copy link
Collaborator

hrshdhgd commented Jul 15, 2024

@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                                                                                                  │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
    

@kevinschaper kevinschaper requested a review from DnlRKorn October 3, 2024 20:27
@kevinschaper
Copy link
Member Author

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

@kevinschaper kevinschaper merged commit ecf3aa2 into main Oct 4, 2024
4 checks passed
@kevinschaper kevinschaper deleted the split_cli_command branch October 4, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants