immuneML.dsl.instruction_parsers package

Submodules

immuneML.dsl.instruction_parsers.DatasetExportParser module

class immuneML.dsl.instruction_parsers.DatasetExportParser.DatasetExportParser[source]

Bases: object

Specification of instruction with a random datasets:

definitions:
datasets:
my_generated_dataset: # a dataset to be exported in the given format

format: RandomRepertoireDataset params:

result_path: generated_dataset/ repertoire_count: 100 sequence_count_probabilities:

100: 0.5 120: 0.5

sequence_length_probabilities:

12: 0.333 13: 0.333 14: 0.333

labels:
immune_event_1:

yes: 0.5 no: 0.5

preprocessing_sequences:
my_preprocessing:
  • my_filter:
    ClonesPerRepertoireFilter:

    lower_limit: 110 upper_limit: 200

instructions:
my_instruction1: # instruction name

type: DatasetExport datasets: # list of datasets to export

  • my_generated_dataset

preprocessing_sequence: my_preprocessing_sequence number_of_processes: 4 export_formats: # list of formats to export the datasets to

  • AIRR

OPTIONAL_KEYS = ['preprocessing_sequence', 'number_of_processes']
REQUIRED_KEYS = ['type', 'datasets', 'export_formats']
parse(key: str, instruction: dict, symbol_table: SymbolTable, path: Path = None) DatasetExportInstruction[source]

immuneML.dsl.instruction_parsers.ExploratoryAnalysisParser module

class immuneML.dsl.instruction_parsers.ExploratoryAnalysisParser.ExploratoryAnalysisParser[source]

Bases: object

The specification consists of a list of analyses that need to be performed;

Each analysis is defined by a dataset identifier, a report identifier and optionally encoding and labels and are loaded into ExploratoryAnalysisUnit objects;

DSL example for ExploratoryAnalysisInstruction assuming that d1, p1, r1, r2, e1, w1 are defined previously in definitions section:

instruction_name:
    type: ExploratoryAnalysis
    number_of_processes: 4
    analyses:
        my_first_analysis: # simple analysis running a report on a dataset
            dataset: d1
            report: r1
        my_second_analysis: # more complicated analysis; including preprocessing, encoding, example weighting and running a report
            dataset: d1
            preprocessing_sequence: p1
            encoding: e1
            example_weighting: w1
            report: r2
            labels:
                - CD
                - CMV
parse(key: str, instruction: dict, symbol_table: SymbolTable, path: Path = None) ExploratoryAnalysisInstruction[source]

immuneML.dsl.instruction_parsers.LabelHelper module

class immuneML.dsl.instruction_parsers.LabelHelper.LabelHelper[source]

Bases: object

static check_label_format(labels: list, instruction_name: str, yaml_location: str)[source]
static create_label_config(labels: list, dataset: Dataset, instruction_name: str, yaml_location: str) LabelConfiguration[source]

immuneML.dsl.instruction_parsers.MLApplicationParser module

class immuneML.dsl.instruction_parsers.MLApplicationParser.MLApplicationParser[source]

Bases: object

Specification example for the MLApplication instruction:

instruction_name:
    type: MLApplication
    dataset: d1
    config_path: ./config.zip
    metrics:
    - accuracy
    - precision
    - recall
    number_of_processes: 4
parse(key: str, instruction: dict, symbol_table: SymbolTable, path: Path) MLApplicationInstruction[source]

immuneML.dsl.instruction_parsers.SimulationParser module

immuneML.dsl.instruction_parsers.SubsamplingParser module

class immuneML.dsl.instruction_parsers.SubsamplingParser.SubsamplingParser[source]

Bases: object

parse(key: str, instruction: dict, symbol_table: SymbolTable, path: Path = None) SubsamplingInstruction[source]

immuneML.dsl.instruction_parsers.TrainMLModelParser module

class immuneML.dsl.instruction_parsers.TrainMLModelParser.TrainMLModelParser[source]

Bases: object

parse(key: str, instruction: dict, symbol_table: SymbolTable, path: Path = None) TrainMLModelInstruction[source]

Module contents