Sequence Identifer (pyncbitk.objects.seqid)#

Identifiers#

class pyncbitk.objects.seqid.SeqId(Serial)#

An abstract base class for defining a sequence identifier.

classmethod __new__(*args, **kwargs)#
static parse(text)#

Parse an identifier from an arbitrary string.

Returns:

SeqId – The appropriate SeqId subclass for the given identifier string.

Example

>>> SeqId.parse("JH379476.1")
GenBankId(TextSeqId('JH379476', version=1))
__eq__(value, /)#

Return self==value.

__ge__(value, /)#

Return self>=value.

__gt__(value, /)#

Return self>value.

__hash__()#

Return hash(self).

__le__(value, /)#

Return self<=value.

__lt__(value, /)#

Return self<value.

__ne__(value, /)#

Return self!=value.

__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqid.LocalId(SeqId)#

A local identifier for naming privately maintained data.

classmethod __new__(*args, **kwargs)#
__init__(id)#

Create a new local identifier.

Parameters:

id (ObjectId) – The object identifier.

__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).

__str__()#

Return str(self).

object_id#

The object identifier.

Type:

ObjectId

class pyncbitk.objects.seqid.RefSeqId(SeqId)#

A sequence identifier from the NCBI Reference Sequence project.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqid.GenBankId(SeqId)#

A sequence identifier from the NCBI GenBank database.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).

id#

The text identifier.

Type:

TextSeqId

class pyncbitk.objects.seqid.ProteinDataBankId(SeqId)#

A sequence identifier from the Protein Data Bank.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqid.GeneralId(SeqId)#

A sequence identifier from a database.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).

db_tag#

A database tag.

Type:

DBTag

class pyncbitk.objects.seqid.OtherId(SeqId)#

A sequence identifier for other databases.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).

id#

The text identifier.

Type:

TextSeqId

Miscellaneous#

class pyncbitk.objects.seqid.TextSeqId(Serial)#

A text identifier.

This format is a standardized identifier for different databases (such as GenBank), where the general format is <accession>.<version>.

classmethod __new__(*args, **kwargs)#
__init__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).

accession#

The identifier accession, if any.

Type:

str or None

name#

The identifier name, if any.

Type:

str or None

release#

The identifier release, if any.

Type:

str or None

version#

The identifier version, if any.

Type:

str or None