kb_python.main

Module Contents

Functions

test_binaries(→ Tuple[bool, bool])

Test whether kallisto and bustools binaries are executable.

get_binary_info(→ str)

Get information on the binaries that will be used for commands.

display_info()

Displays kb, kallisto and bustools version + citation information, along

display_technologies()

Displays a list of supported technologies along with whether kb provides

parse_compile(parser, args[, temp_dir])

Parser for the compile command.

parse_ref(parser, args[, temp_dir])

Parser for the ref command.

parse_count(parser, args[, temp_dir])

Parser for the count command.

setup_info_args(→ argparse.ArgumentParser)

Helper function to set up a subparser for the info command.

setup_compile_args(→ argparse.ArgumentParser)

Helper function to set up a subparser for the compile command.

setup_ref_args(→ argparse.ArgumentParser)

Helper function to set up a subparser for the ref command.

setup_count_args(→ argparse.ArgumentParser)

Helper function to set up a subparser for the count command.

main()

Command-line entrypoint.

Attributes

COMMAND_TO_FUNCTION

kb_python.main.test_binaries() Tuple[bool, bool]

Test whether kallisto and bustools binaries are executable.

Internally, this function calls utils.get_kallisto_version() and utils.get_bustools_version(), both of which return None if there is something wrong with their respective binaries.

Returns

A tuple of two booleans indicating kallisto and bustools binaries.

kb_python.main.get_binary_info() str

Get information on the binaries that will be used for commands.

Returns

kallisto and bustools binary versions and paths.

kb_python.main.display_info()

Displays kb, kallisto and bustools version + citation information, along with a brief description and examples.

kb_python.main.display_technologies()

Displays a list of supported technologies along with whether kb provides a whitelist for that technology and the FASTQ argument order for kb count.

kb_python.main.parse_compile(parser: argparse.ArgumentParser, args: argparse.Namespace, temp_dir: str = 'tmp')

Parser for the compile command.

Parameters
  • parser – The argument parser

  • args – Parsed command-line arguments

kb_python.main.parse_ref(parser: argparse.ArgumentParser, args: argparse.Namespace, temp_dir: str = 'tmp')

Parser for the ref command.

Parameters
  • parser – The argument parser

  • args – Parsed command-line arguments

kb_python.main.parse_count(parser: argparse.ArgumentParser, args: argparse.Namespace, temp_dir: str = 'tmp')

Parser for the count command.

Parameters
  • parser – The argument parser

  • args – Parsed command-line arguments

kb_python.main.COMMAND_TO_FUNCTION
kb_python.main.setup_info_args(parser: argparse.ArgumentParser, parent: argparse.ArgumentParser) argparse.ArgumentParser

Helper function to set up a subparser for the info command.

Parameters
  • parser – Parser to add the info command to

  • parent – Parser parent of the newly added subcommand. used to inherit shared commands/flags

Returns

The newly added parser

kb_python.main.setup_compile_args(parser: argparse.ArgumentParser, parent: argparse.ArgumentParser) argparse.ArgumentParser

Helper function to set up a subparser for the compile command.

Parameters
  • parser – Parser to add the compile command to

  • parent – Parser parent of the newly added subcommand. used to inherit shared commands/flags

Returns

The newly added parser

kb_python.main.setup_ref_args(parser: argparse.ArgumentParser, parent: argparse.ArgumentParser) argparse.ArgumentParser

Helper function to set up a subparser for the ref command.

Parameters
  • parser – Parser to add the ref command to

  • parent – Parser parent of the newly added subcommand. used to inherit shared commands/flags

Returns

The newly added parser

kb_python.main.setup_count_args(parser: argparse.ArgumentParser, parent: argparse.ArgumentParser) argparse.ArgumentParser

Helper function to set up a subparser for the count command.

Parameters
  • parser – Parser to add the count command to

  • parent – Parser parent of the newly added subcommand. used to inherit shared commands/flags

Returns

The newly added parser

kb_python.main.main()

Command-line entrypoint.