Bio.UniProt package

Submodules

Module contents

Code for dealing with assorted UniProt file formats and interacting with the UniProt database.

This currently include parsers for the GAF, GPA and GPI formats from UniProt-GOA as the module Bio.UniProt.GOA.

See also Bio.SwissProt and the “swiss” support in Bio.SeqIO for the legacy plain text sequence format still used in UniProt.

See also Bio.SeqIO.SwissIO for the “uniprot-xml” support in Bio.SeqIO.

Bio.UniProt.search(query: str, fields: list[str] | None = None, batch_size: int = 500) _UniProtSearchResults

Search the UniProt database.

Consider using query syntax and query fields to refine your search.

See the API details here.

>>> from Bio import UniProt
>>> from itertools import islice
>>> # Get the first 10 results
>>> results = UniProt.search("(organism_id:2697049) AND (reviewed:true)")[:10]
Parameters:
  • query (str) – The query string to search UniProt with

  • fields (List[str], optional) – The columns to retrieve in the results, defaults to all fields

  • batch_size (int) – The number of results to retrieve in each batch, defaults to 500

Returns:

An iterator over the search results

Return type:

_UniProtSearchResults