Skip to content

koza

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:

  • split: Split a file by fields
  • transform: Transform a source file
  • validate: Validate a source file

koza split

Split a file by fields

Usage:

$ koza split [OPTIONS] FILE FIELDS

Arguments:

  • FILE: Path to the source kgx file to be split [required]
  • FIELDS: Comma separated list of fields to split on [required]

Options:

  • --remove-prefixes / --no-remove-prefixes: Remove prefixes from the file names for values from the specified fields. (e.g, NCBIGene:9606 becomes 9606 [default: no-remove-prefixes]
  • --output-dir TEXT: Path to output directory [default: output]
  • --help: Show this message and exit.

koza transform

Transform a source file

Usage:

$ koza transform [OPTIONS]

Options:

  • --source TEXT: Source metadata file [required]
  • --output-dir TEXT: Path to output directory [default: ./output]
  • --output-format [tsv|jsonl|kgx]: Output format [default: tsv]
  • --global-table TEXT: Path to global translation table
  • --local-table TEXT: Path to local translation table
  • --schema TEXT: Path to schema YAML for validation in writer
  • --row-limit INTEGER: Number of rows to process (if skipped, processes entire source file)
  • --debug / --quiet
  • --log / --no-log: Optional log mode - set true to save output to ./logs [default: no-log]
  • --help: Show this message and exit.

koza validate

Validate a source file

Usage:

$ koza validate [OPTIONS]

Options:

  • --file TEXT: Path or url to the source file [required]
  • --format [csv|jsonl|json|yaml]: [default: csv]
  • --delimiter TEXT: [default: ,]
  • --header-delimiter TEXT
  • --skip-blank-lines / --no-skip-blank-lines: [default: skip-blank-lines]
  • --help: Show this message and exit.