MappingTuple

class MappingTuple(source_prefix: str, source_id: str, source_name: str, relation: str, target_prefix: str, target_identifier: str, target_name: str, type: str, source: str, prediction_type: str | None, prediction_source: str | None, prediction_confidence: float | None)[source]

Bases: NamedTuple

A named tuple class for mappings.

Create new instance of MappingTuple(source_prefix, source_id, source_name, relation, target_prefix, target_identifier, target_name, type, source, prediction_type, prediction_source, prediction_confidence)

Attributes Summary

prediction_confidence

Alias for field number 11

prediction_source

Alias for field number 10

prediction_type

Alias for field number 9

relation

Alias for field number 3

source

Alias for field number 8

source_curie

Concatenate the source prefix and ID to a CURIE.

source_id

Alias for field number 1

source_name

Alias for field number 2

source_prefix

Alias for field number 0

target_curie

Concatenate the target prefix and ID to a CURIE.

target_identifier

Alias for field number 5

target_name

Alias for field number 6

target_prefix

Alias for field number 4

type

Alias for field number 7

Methods Summary

as_dict()

Get the mapping tuple as a dictionary.

from_dict(mapping)

Get the mapping tuple from a dictionary.

Attributes Documentation

prediction_confidence: float | None

Alias for field number 11

prediction_source: str | None

Alias for field number 10

prediction_type: str | None

Alias for field number 9

relation: str

Alias for field number 3

source: str

Alias for field number 8

source_curie

Concatenate the source prefix and ID to a CURIE.

source_id: str

Alias for field number 1

source_name: str

Alias for field number 2

source_prefix: str

Alias for field number 0

target_curie

Concatenate the target prefix and ID to a CURIE.

target_identifier: str

Alias for field number 5

target_name: str

Alias for field number 6

target_prefix: str

Alias for field number 4

type: str

Alias for field number 7

Methods Documentation

as_dict() Mapping[str, Any][source]

Get the mapping tuple as a dictionary.

classmethod from_dict(mapping: Mapping[str, str]) MappingTuple[source]

Get the mapping tuple from a dictionary.