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

Query a running server with a sequence.

Parameters:
intype : str

The type of input sequence. Must be one of ‘dna’, ‘rna’, or ‘protein’.

host : str

The hostname or IP address of the server to query.

port : int

The port number to use when attempting to connect to the server.

faName : str

The name of the input sequence.

isComplex : bool

Whether the input sequence is complex.

isProt : bool

Whether the input sequence is a protein sequence.

Returns:

The result of the query.

Return type:

str

This function queries a running server with a sequence by sending a “query” message to the server. The function takes the type of input sequence, hostname, port number, sequence name, and whether the sequence is complex or a protein sequence as arguments. The function returns the result of the query as a string.

Example

>>> server_query("dna", "localhost", 8080, "sequence1", False, False)
'result1'