immuneML.dsl.definition_parsers package
Submodules
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 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
immuneML.dsl.definition_parsers.MLParser module
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
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
immuneML.dsl.definition_parsers.SimulationParser module
- class immuneML.dsl.definition_parsers.SimulationParser.SimulationParser[source]
Bases:
object
YAML specification:
- definitions:
- dataset:
- my_dataset:
…
- motifs:
- m1:
seed: AAC # “/” character denotes the gap in the seed if present (e.g. AA/C) instantiation:
- GappedKmer:
# 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
- hamming_distance_probabilities:
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
- signals:
- s1:
- 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
- simulations:
- sim1: # one Simulation object consists of a dict of Implanting objects
- i1:
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
- instructions:
- my_simulation_instruction:
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]