immuneML.data_model.receptor.receptor_sequence package


immuneML.data_model.receptor.receptor_sequence.Chain module

class immuneML.data_model.receptor.receptor_sequence.Chain.Chain(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

static get_chain(item: str)[source]

immuneML.data_model.receptor.receptor_sequence.ReceptorSequence module

class immuneML.data_model.receptor.receptor_sequence.ReceptorSequence.ReceptorSequence(amino_acid_sequence: str = None, nucleotide_sequence: str = None, identifier: str = None, annotation: SequenceAnnotation = None, metadata: SequenceMetadata = None)[source]

Bases: DatasetItem

FIELDS = {'amino_acid_sequence': <class 'str'>, 'annotation': <class 'dict'>, 'identifier': <class 'str'>, 'metadata': <class 'dict'>, 'nucleotide_sequence': <class 'str'>, 'version': <class 'str'>}
classmethod create_from_record(record: void)[source]
get_attribute(name: str)[source]

exports the sequence object as a numpy record

classmethod get_record_names()[source]
get_sequence(sequence_type: SequenceType = None)[source]

Returns receptor_sequence (nucleotide/amino acid) that corresponds to provided sequence type or preset receptor_sequence type from EnvironmentSettings class if no type is provided

set_annotation(annotation: SequenceAnnotation)[source]
set_metadata(metadata: SequenceMetadata)[source]
set_sequence(sequence: str, sequence_type: SequenceType)[source]
version = '1'

immuneML.data_model.receptor.receptor_sequence.SequenceAnnotation module

class immuneML.data_model.receptor.receptor_sequence.SequenceAnnotation.SequenceAnnotation(implants: list = None, other: dict = None)[source]

Bases: object

Sequence Annotation class includes antigen-specific data (in experimental scenario) and implanted signals (in simulated scenario)


immuneML.data_model.receptor.receptor_sequence.SequenceFrameType module

class immuneML.data_model.receptor.receptor_sequence.SequenceFrameType.SequenceFrameType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

IN = 'IN'

immuneML.data_model.receptor.receptor_sequence.SequenceMetadata module

class immuneML.data_model.receptor.receptor_sequence.SequenceMetadata.SequenceMetadata(v_subgroup: str = None, v_gene: str = None, v_allele: str = None, j_subgroup: str = None, j_gene: str = None, j_allele: str = None, chain=None, count: int = None, frame_type: str = 'IN', region_type: str = None, cell_id: str = None, custom_params: dict = None)[source]

Bases: object

class modeling the existing knowledge about a receptor_sequence, should be stored according to IMGT gene nomenclature (human can be found here):

  • v subgroup

  • v gene

  • v allele

  • j subgroup

  • j gene

  • j allele

  • chain

  • count

  • region_type (e.g. IMGT_CDR3, IMGT_CDR1, FULL_SEQUENCE)

  • frame_type (e.g. IN, OUT, STOP)

  • sample

  • custom params (dictionary with custom sequence information)

get_attribute(name: str)[source]

Returns the attribute value if attribute is present either directly or in custom_params, otherwise returns None

Module contents