immuneML.dsl.definition_parsers package


immuneML.dsl.definition_parsers.DefinitionParser module

class immuneML.dsl.definition_parsers.DefinitionParser.DefinitionParser[source]

Bases: object

static create_specs_defs(specs_datasets: dict, simulation: dict, preprocessings: dict, motifs: dict, signals: dict, encodings: dict, ml_methods: dict, reports: dict)[source]
static generate_docs(path: Path)[source]
static make_dataset_docs(path: Path)[source]
static make_encodings_docs(path: Path)[source]
static make_ml_methods_docs(path: Path)[source]
static make_preprocessing_docs(path: Path)[source]
static make_reports_docs(path: Path)[source]
static make_simulation_docs(path: Path)[source]
static parse(workflow_specification: dict, symbol_table: SymbolTable, result_path: Path)[source]

immuneML.dsl.definition_parsers.DefinitionParserOutput module

class immuneML.dsl.definition_parsers.DefinitionParserOutput.DefinitionParserOutput(symbol_table: SymbolTable, specification: dict)[source]

Bases: object

immuneML.dsl.definition_parsers.EncodingParser module

class immuneML.dsl.definition_parsers.EncodingParser.EncodingParser[source]

Bases: object

static parse(encodings: dict, symbol_table: SymbolTable)[source]
static parse_encoder(*args, **kwargs)
static parse_encoder_internal(short_class_name: str, encoder_params: dict)[source]

immuneML.dsl.definition_parsers.MLParser module

class immuneML.dsl.definition_parsers.MLParser.MLParser[source]

Bases: object

static create_method_instance(ml_specification: dict, ml_method_class, key: str) tuple[source]
static parse(specification: dict, symbol_table: SymbolTable)[source]

immuneML.dsl.definition_parsers.MotifParser module

class immuneML.dsl.definition_parsers.MotifParser.MotifParser[source]

Bases: object

static parse_motifs(motifs: dict, symbol_table: SymbolTable)[source]

immuneML.dsl.definition_parsers.PreprocessingParser module

class immuneML.dsl.definition_parsers.PreprocessingParser.PreprocessingParser[source]

Bases: object

keyword = 'preprocessing_sequences'
static parse(specs: dict, symbol_table: SymbolTable)[source]

immuneML.dsl.definition_parsers.ReportParser module

class immuneML.dsl.definition_parsers.ReportParser.ReportParser[source]

Bases: object

static parse_reports(reports: dict, symbol_table: SymbolTable)[source]

immuneML.dsl.definition_parsers.SignalParser module

class immuneML.dsl.definition_parsers.SignalParser.SignalParser[source]

Bases: object

VALID_KEYS = ['motifs', 'implanting']
static parse_signals(*args, **kwargs)

immuneML.dsl.definition_parsers.SimulationParser module

class immuneML.dsl.definition_parsers.SimulationParser.SimulationParser[source]

Bases: object

YAML specification:



seed: AAC # “/” character denotes the gap in the seed if present (e.g. AA/C) instantiation:


# probability that when hamming distance is allowed a letter in the seed will be replaced by # other alphabet letters - alphabet_weights alphabet_weights:

A: 0.2 C: 0.2 D: 0.4 E: 0.2

# Relative probabilities of choosing each position in the seed for hamming distance modification. # The probabilities will be scaled to sum to one - position_weights position_weights:

0: 1 1: 0 2: 0


0: 0.5 # Hamming distance of 0 (no change) with probability 0.5 1: 0.5 # Hamming distance of 1 (one letter change) with probability 0.5

min_gap: 0 max_gap: 1

motifs: # list of all motifs for signal which will be uniformly sampled to get a motif instance for implanting
  • m1

sequence_position_weights: # likelihood of implanting at IMGT position of receptor sequence

107: 0.5

implanting: HealthySequence # choose only sequences with no other signals for to implant one of the motifs

sim1: # one Simulation object consists of a dict of Implanting objects

dataset_implanting_rate: 0.5 # percentage of repertoire where the signals will be implanted repertoire_implanting_rate: 0.01 # percentage of sequences within repertoire where the signals will be implanted signals:

  • s1


type: Simulation dataset: my_dataset simulation: sim1 batch_size: 5 # number of repertoires that can be loaded at the same time

# (only affects the speed)

export_formats: [AIRR, ImmuneML]

static parse_simulations(simulations: dict, symbol_table: SymbolTable)[source]

Module contents