pypath.internals.annot_formats.AnnotDef§

class pypath.internals.annot_formats.AnnotDef(name, resource, parent=None, aspect='functional', scope='specific', source='resource_specific', args=None, exclude=None, transmitter=None, receiver=None, resource_name=None, limit=None, avoid=None, enabled=True)[source]§

Bases: AnnotDefBase

Annotations are defined by a name, a resource and an args parameter. If the former is a string it will be first looked up among the annotation resources in pypath.annot.db. Otherwise among the keys of the classes in the CustomAnnotation object or in the dictionary of the class_definitions. If source is a set, it will be used as a category without further processing. If it is callable it will be called and should return a set. If bool(args) is False, in case of annotations in pypath.annot.db the to_set method will be called. Otherwise args will be passed to the get_subset method. If resource is callable, args will be passed if available.

__init__()§

Methods

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

args

Alias for field number 6

aspect

Alias for field number 3

avoid

Alias for field number 12

enabled

Alias for field number 13

exclude

Alias for field number 7

key

limit

Alias for field number 11

name

Alias for field number 0

parent

Alias for field number 2

receiver

Alias for field number 9

resource

Alias for field number 1

resource_name

Alias for field number 10

scope

Alias for field number 4

source

Alias for field number 5

transmitter

Alias for field number 8

args§

Alias for field number 6

aspect§

Alias for field number 3

avoid§

Alias for field number 12

count(value, /)§

Return number of occurrences of value.

enabled§

Alias for field number 13

exclude§

Alias for field number 7

index(value, start=0, stop=9223372036854775807, /)§

Return first index of value.

Raises ValueError if the value is not present.

limit§

Alias for field number 11

name§

Alias for field number 0

parent§

Alias for field number 2

receiver§

Alias for field number 9

resource§

Alias for field number 1

resource_name§

Alias for field number 10

scope§

Alias for field number 4

source§

Alias for field number 5

transmitter§

Alias for field number 8