immuneML.pairwise_repertoire_comparison package

Submodules

immuneML.pairwise_repertoire_comparison.ComparisonData module

class immuneML.pairwise_repertoire_comparison.ComparisonData.ComparisonData(**kwargs)[source]

Bases: object

add_items_for_repertoire(items: list, repertoire_id: str)[source]
build_matching_fn()[source]
filter_existing_items(items: list, repertoire_id: str) list[source]
get_batch(index: int, columns: Optional[list] = None, return_dict: bool = False)[source]
get_batches(columns: Optional[list] = None, return_dict: bool = False)[source]
get_item_names()[source]
get_item_vector(index: int)[source]
get_item_vectors(repertoire_ids: Optional[list] = None)[source]
get_repertoire_vector(identifier: str)[source]
get_repertoire_vectors(identifiers: list)[source]
get_tmp_batches()[source]
load_tmp_batch(batch_index: int) dict[source]
merge_tmp_batches_to_matrix()[source]
process_dataset(**kwargs)
process_repertoire(**kwargs)
store_tmp_batch(batch: dict, batch_index: int)[source]

immuneML.pairwise_repertoire_comparison.ComparisonDataBatch module

class immuneML.pairwise_repertoire_comparison.ComparisonDataBatch.ComparisonDataBatch(items: list, repertoire_index_mapping: Dict[str, int], path: pathlib.Path, identifier: int, matrix: Optional[numpy.ndarray] = None)[source]

Bases: object

Parameters
  • matrix – array with dimension items x repertoires, where items are defined by comparison attributes specified in ComparisonData class and can include, for instance, receptor sequences or combinations of receptor sequences and V and J gene

  • items – the item names extracted from the repertoires in the dataset on which the repertoires are evaluated (e.g. sequences or combinations of sequences and genes

  • repertoire_index_mapping – a mapping between the repertoire identifier (a string) and a column number for faster access of columns (repertoire vectors w.r.t. given items) in the comparison data matrix where columns correspond to repertoires

  • path (Path) – path to directory where comp data is stored

  • identifier (int) – identifier of the batch

get_items()[source]
get_matrix()[source]
identifier: int
items: list
load()[source]
matrix: numpy.ndarray = None
path: pathlib.Path
repertoire_index_mapping: Dict[str, int]
store()[source]

immuneML.pairwise_repertoire_comparison.PairwiseRepertoireComparison module

class immuneML.pairwise_repertoire_comparison.PairwiseRepertoireComparison.PairwiseRepertoireComparison(**kwargs)[source]

Bases: object

compare(dataset: immuneML.data_model.dataset.RepertoireDataset.RepertoireDataset, comparison_fn, comparison_fn_name)[source]
compare_repertoires(**kwargs)
create_comparison_data(**kwargs)
memo_by_params(dataset: immuneML.data_model.dataset.RepertoireDataset.RepertoireDataset)[source]
prepare_caching_params(dataset: immuneML.data_model.dataset.RepertoireDataset.RepertoireDataset)[source]
prepare_paralellization_arguments(repertoire_count: int, repertoire_identifiers: list, comparison_result)[source]

Module contents