immuneML.data_model.receptor.receptor_sequence package

Submodules

immuneML.data_model.receptor.receptor_sequence.Chain module

class immuneML.data_model.receptor.receptor_sequence.Chain.Chain(value)[source]

Bases: enum.Enum

An enumeration.

ALPHA = 'TRA'
BETA = 'TRB'
DELTA = 'TRD'
GAMMA = 'TRG'
HEAVY = 'IGH'
KAPPA = 'IGK'
LIGHT = 'IGL'
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: Optional[str] = None, nucleotide_sequence: Optional[str] = None, identifier: Optional[str] = None, annotation: Optional[immuneML.data_model.receptor.receptor_sequence.SequenceAnnotation.SequenceAnnotation] = None, metadata: immuneML.data_model.receptor.receptor_sequence.SequenceMetadata.SequenceMetadata = <immuneML.data_model.receptor.receptor_sequence.SequenceMetadata.SequenceMetadata object>)[source]

Bases: immuneML.data_model.DatasetItem.DatasetItem

get_attribute(name: str)[source]
get_sequence(sequence_type: Optional[immuneML.environment.SequenceType.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: immuneML.data_model.receptor.receptor_sequence.SequenceAnnotation.SequenceAnnotation)[source]
set_metadata(metadata: immuneML.data_model.receptor.receptor_sequence.SequenceMetadata.SequenceMetadata)[source]
set_sequence(sequence: str, sequence_type: immuneML.environment.SequenceType.SequenceType)[source]

immuneML.data_model.receptor.receptor_sequence.ReceptorSequenceList module

class immuneML.data_model.receptor.receptor_sequence.ReceptorSequenceList.ReceptorSequenceList[source]

Bases: collections.abc.MutableSequence

check(v)[source]
insert(i, v)[source]

S.insert(index, value) – insert value before index

immuneML.data_model.receptor.receptor_sequence.SequenceAnnotation module

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

Bases: object

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

add_implant(implant: immuneML.simulation.implants.ImplantAnnotation.ImplantAnnotation)[source]

immuneML.data_model.receptor.receptor_sequence.SequenceFrameType module

class immuneML.data_model.receptor.receptor_sequence.SequenceFrameType.SequenceFrameType(value)[source]

Bases: enum.Enum

An enumeration.

IN = 'IN'
OUT = 'OUT'
STOP = 'STOP'

immuneML.data_model.receptor.receptor_sequence.SequenceMetadata module

class immuneML.data_model.receptor.receptor_sequence.SequenceMetadata.SequenceMetadata(v_subgroup: Optional[str] = None, v_gene: Optional[str] = None, v_allele: Optional[str] = None, j_subgroup: Optional[str] = None, j_gene: Optional[str] = None, j_allele: Optional[str] = None, chain=None, count: Optional[int] = None, frame_type: str = 'IN', region_type: Optional[str] = None, cell_id: Optional[str] = None, custom_params: Optional[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