immuneML.encodings.deeprc package

Submodules

immuneML.encodings.deeprc.DeepRCEncoder module

class immuneML.encodings.deeprc.DeepRCEncoder.DeepRCEncoder(context: Optional[dict] = None, name: Optional[str] = None)[source]

Bases: immuneML.encodings.DatasetEncoder.DatasetEncoder

DeepRCEncoder should be used in combination with the DeepRC ML method (DeepRC). This encoder writes the data in a RepertoireDataset to .tsv files. For each repertoire, one .tsv file is created containing the amino acid sequences and the counts. Additionally, one metadata .tsv file is created, which describes the subset of repertoires that is encoded by a given instance of the DeepRCEncoder.

Note: sequences where count is None, the count value will be set to 1

YAML specification:

my_deeprc_encoder: DeepRC
COUNTS_COLUMN = 'templates'
EXTENSION = 'tsv'
ID_COLUMN = 'ID'
SEP = '\t'
SEQUENCE_COLUMN = 'amino_acid'
static build_object(dataset, **params)[source]
encode(dataset, params: immuneML.encodings.EncoderParams.EncoderParams) immuneML.data_model.dataset.RepertoireDataset.RepertoireDataset[source]
static export_encoder(path: pathlib.Path, encoder) pathlib.Path[source]
export_metadata_file(dataset, labels, output_folder)[source]
export_repertoire_tsv_files(output_folder: pathlib.Path)[source]
set_context(context: dict)[source]

Module contents