pxblat.Client.query(in_seqs: list[str | Path] | list[str] | list[Path] | str | Path)[source]

Query the server with the specified sequences.

Parameters:
in_seqs: list[str | Path] | list[str] | list[Path] | str | Path

The sequences to query.

Returns:

Bio.SearchIO.QueryResult

Return type:

The query results

Examples

>>> from pxblat import Client, Server
>>> host = "localhost"
>>> port = 65000
>>> seq_dir = "."
>>> two_bit = "./test_ref.2bit"
>>> client = Client(
...     host=host,
...     port=port,
...     seq_dir=seq_dir,
...     min_score=20,
...     min_identity=90,
... )
>>> with Server(host, port, two_bit, can_stop=True, step_size=5) as server:
...     # work() assume work() is your own function that takes time to prepare something
...     server.wait_ready()
...     result1 = client.query("ATCG")
...     result2 = client.query("AtcG")
...     result3 = client.query("test_case1.fa")
...     result4 = client.query(["ATCG", "ATCG"])
...     result5 = client.query(["test_case1.fa"])
...     result6 = client.query(["cgTA", "test_case1.fa"])
...     print(result3[0])  # print result