freqsap.accession

Module for handling protein accession identifiers.

Classes

Accession

Protein accession identifier.

Module Contents

class freqsap.accession.Accession(accession: str)[source]

Protein accession identifier.

Validates and stores UniProt accession identifiers according to the UniProt accession number format.

_id[source]
_pattern = '[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}'[source]
valid() bool[source]

Validate the accession using the built in regex pattern.

Returns:

True if valid, otherwise False.

Return type:

bool

__str__() str[source]

Return the string representation of the accession.

Returns:

The accession identifier string.

Return type:

str