-
pxblat.read(content: str, format=
None, seqid=None, **kwargs)[source] Reads and returns the first query result from the given content.
This function takes a string content and a format string, parses the content using the
parsefunction, and returns the first query result. If no results are found, or if more than one result is found, it raises an error.- Parameters:¶
- content : str¶
The string content to parse and read.
- format : str, optional¶
The format string indicating how to parse the content. If not provided, ‘psl’ format will be used. Defaults to None.
- seqid : str, optional¶
The sequence identifier to verify the query results. If not provided, no filtering will be done. Defaults to None.
- **kwargs¶
Arbitrary keyword arguments to be passed to the
parsefunction.
- Returns:¶
The first query result found in the content.
- Return type:¶
query_result
- Raises:¶
ValueError – If no query results are found in the content, or if more than one query result is found.
ValueError/TypeError – If there is an error in parsing the content. These exceptions are propagated from the
parsefunction.