immuneML.simulation.util package

Submodules

immuneML.simulation.util.bnp_util module

immuneML.simulation.util.bnp_util.merge_dataclass_objects(objects: list)[source]
immuneML.simulation.util.bnp_util.pad_ragged_array(new_array, target_shape, padded_value)[source]

pad ragged array to match sequence lengths

immuneML.simulation.util.igor_helper module

immuneML.simulation.util.igor_helper.make_skewed_model_files(v_genes: list, j_genes: list, original_model_path: Path, new_model_path: Path) Path[source]
Parameters:
  • j_genes – a list of j gene patterns to be matched against the original model

  • v_genes – a list of v gene patterns to be matched against the original model

  • original_model_path – path to the folder of the original igor model files

  • new_model_path – where to store updated files

Returns:

Path to the folder with new model files

immuneML.simulation.util.util module

immuneML.simulation.util.util.annotate_sequences(sequences, is_amino_acid: bool, all_signals: list, annotated_dc, sim_item_name: str = None, region_type: RegionType = RegionType.IMGT_CDR3)[source]
immuneML.simulation.util.util.assign_duplicate_counts(sequences, clonal_frequency_params: dict)[source]
immuneML.simulation.util.util.build_imgt_positions(sequence_length: int, motif_instance: MotifInstance, sequence_region_type)[source]
immuneML.simulation.util.util.check_iteration_progress(iteration: int, max_iterations: int)[source]
immuneML.simulation.util.util.check_sequence_count(sim_item, sequences: BackgroundSequences)[source]
immuneML.simulation.util.util.choose_implant_position(imgt_positions, position_weights)[source]
immuneML.simulation.util.util.construct_sequence_metadata_object(sequence, metadata: dict, custom_params, immune_events: dict, locus: Chain) dict[source]
immuneML.simulation.util.util.filter_out_illegal_sequences(sequences, sim_item: SimConfigItem, all_signals: list, max_signals_per_sequence: int, max_motifs_per_sequence: int)[source]
immuneML.simulation.util.util.filter_sequences_by_length(sequences, sim_item: SimConfigItem, sequence_type)[source]
immuneML.simulation.util.util.get_allowed_positions(signal: Signal, sequence_array: RaggedArray, region_type: RegionType)[source]
immuneML.simulation.util.util.get_bnp_data(sequence_path, bnp_data_class)[source]
immuneML.simulation.util.util.get_max_seq_length(sim_item: SimConfigItem, sequence_type: SequenceType, region_type: RegionType) int[source]
immuneML.simulation.util.util.get_min_seq_length(sim_item: SimConfigItem, sequence_type: SequenceType, region_type: RegionType) int[source]
immuneML.simulation.util.util.get_no_signal_sequences(sequences, used_seq_count: dict, seqs_no_signal_count: int, bnp_data_class, sequence_paths: Dict[str, Path], sim_item: SimConfigItem)[source]
immuneML.simulation.util.util.get_region_type(sequences) RegionType[source]
immuneML.simulation.util.util.get_sequence_per_signal_count(sim_item: SimConfigItem) dict[source]
immuneML.simulation.util.util.get_signal_sequence_count(repertoire_count: int, signal_proportion: float, receptors_in_repertoire_count: int) int[source]
immuneML.simulation.util.util.get_signal_sequences(bnp_data_class, used_seq_count: dict, sim_item: SimConfigItem, sequence_paths: Dict[str, Path])[source]
immuneML.simulation.util.util.make_annotated_dataclass(annotation_fields: list, signals: list)[source]
immuneML.simulation.util.util.make_bnp_annotated_sequences(sequences: BackgroundSequences, bnp_data_class, all_signals: list, signal_matrix: ndarray, signal_positions: dict)[source]
immuneML.simulation.util.util.make_repertoire_from_sequences(sequences: BNPDataClass, repertoires_path, sim_item: SimConfigItem, signals: List[Signal]) Repertoire[source]
immuneML.simulation.util.util.make_sequence_paths(path: Path, signals: List[Signal]) Dict[str, Path][source]
immuneML.simulation.util.util.make_signal_metadata(sim_item, signals) Dict[str, bool][source]
immuneML.simulation.util.util.match_genes(v_call, v_call_array, j_call, j_call_array)[source]
immuneML.simulation.util.util.match_motif(motif: str | LigoPWM, encoding, sequence_array)[source]
immuneML.simulation.util.util.match_motif_group(motif_group: list, encoding, sequence_array, matches_gene, matches)[source]

Match if two motifs co-occur in the same sequence

immuneML.simulation.util.util.match_motif_regexes(motifs, encoding, sequence_array, matches_gene, matches)[source]
immuneML.simulation.util.util.needs_seqs_with_signal(sequence_per_signal_count: dict) bool[source]
immuneML.simulation.util.util.prepare_data_for_airr_seq_set(in_df: pandas.DataFrame) pandas.DataFrame[source]
immuneML.simulation.util.util.prepare_data_for_repertoire_obj(sequences)[source]
immuneML.simulation.util.util.update_seqs_with_signal(max_counts: dict, annotated_sequences, all_signals, sim_item_signals, seqs_with_signal_path: dict)[source]
immuneML.simulation.util.util.update_seqs_without_signal(max_count, annotated_sequences, seqs_no_signal_path: Path)[source]
immuneML.simulation.util.util.write_bnp_data(path: Path, data, append_if_exists: bool = True)[source]

Module contents