pypath.internals.input_formats.UniprotMapping§

class pypath.internals.input_formats.UniprotMapping(id_type_a, id_type_b='uniprot', ncbi_tax_id=9606, swissprot='true')[source]§

Bases: MappingInput

__init__(id_type_a, id_type_b='uniprot', ncbi_tax_id=9606, swissprot='true')[source]§

Defines an ID conversion table to retrieve from UniProt.

id_typestr

Type of accession numbers you would like to translate.

target_id_typestr

Type of accession numbers you would like to translate to.

taxint

NCBI Taxonomy ID of the organism of interest.

swissprotstr

Look for SwissProt or Trembl. Passed directly to UniProt`s reviewed parameter. yes or no To fetch Trembl and SwissProt together, set value to None.

mappingbool

Get the data from UniProt`s programmatic access query interface, (uniprot.org/uniprot) or the batch retrieval/id mapping service (uniprot.org/mapping). These have slightly different APIs and capabilities. Some IDs can be obtained from the former, some from the latter.

Methods

__init__(id_type_a[, id_type_b, ...])

Defines an ID conversion table to retrieve from UniProt.

possible(id_type_a, id_type_b[, ncbi_tax_id])

resource_id_type(id_type[, override])

For an ID type label used in pypath, returns the one used in the UniProt web service.

set_organism(ncbi_tax_id)

swap_sides()

Attributes

field

subfield

static resource_id_type(id_type, override=None)[source]§

For an ID type label used in pypath, returns the one used in the UniProt web service. If the label is not available in the built in list None is returned.

Returns
(str): The ID type label used by UniProt; None if the input

label is not known.