Reference

Classes

class pxblat.Client[source]

A class for managing client connections to a server in a separate thread.

class pxblat.ClientThread(threading.Thread)[source]

A class for managing client connections to a server in a separate thread.

class pxblat.Server(contextlib.ContextDecorator)[source]

A context manager and decorator for managing a server process.

class pxblat.ClientOption(pybind11_builtins.pybind11_object)
class pxblat.ServerOption(pybind11_builtins.pybind11_object)
class pxblat.TwoBitToFaOption(pybind11_builtins.pybind11_object)
class pxblat.UsageStats(pybind11_builtins.pybind11_object)
class pxblat.Status(mashumaro.mixins.json.DataClassJSONMixin, mashumaro.mixins.dict.DataClassDictMixin)[source]

A data class representing the status of a server.

Top-level Functions

pxblat.read(content: str, format=None, seqid=None, **kwargs)[source]

Reads and returns the first query result from the given content.

pxblat.build_index(gfx_file: str, seq_files: list[str], options)[source]

To generate a precomputed index.

pxblat.check_port_in_use(host: str, port: int, ...) bool[source]

Check if a given port on a host is in use.

pxblat.check_port_open(host: str, port: int) bool[source]

Check the port is open and can accept message or not.

pxblat.copy_client_option(option: ClientOption) ClientOption[source]

Copies the ClientOption object.

pxblat.create_client_option()[source]

Creates a new ClientOption object with default values.

pxblat.create_server_option() ServerOption[source]

Creates a new ServerOption object with default values.

pxblat.files(host: str, port: int) list[str][source]

Get a list of files available on the server.

pxblat.find_free_port(host: str, start: int, ...) int[source]

Find an available port in the range of [start, end).

pxblat.query_server(option: ClientOption, ...)[source]

Sends a query to the server and returns the result.

pxblat.server_query(intype: str, host: str, port: int, faName, ...)[source]

Query a running server with a sequence.

pxblat.start_server(host: str, port: int, two_bit_file: str, ...)[source]

Start a server in blocking mode.

pxblat.start_server_mt(host: str, port: int, two_bit_file: str, ...)[source]

Starts a server on a new thread.

pxblat.start_server_mt_nb(host: str, port: int, ...) Process[source]

Starts a server on a new thread and immediately returns a Process object.

pxblat.status_server(host: str, ...) Status | dict[str, str][source]

Get the status of a running server.

pxblat.stop_server(host: str, port: int)[source]

Stop a running server.

pxblat.wait_server_ready(host: str, port: int, ...) None[source]

Wait for a server to become ready by checking if a given port is open or if a specific server status is reached.

pxblat.fa_to_two_bit(inFiles: list[str], outFile: str, *, ...)[source]

Convert one or more FASTA files to two-bit format.

pxblat.two_bit_to_fa(inName: str | Path, outName: str | Path, ...)[source]

Converts a .2bit file to a .fa file.