[docs]classCountPerSequenceFilter(Filter):""" Removes all sequences from a Repertoire when they have a count below low_count_limit, or sequences with no count value if remove_without_counts is True. This filter can be applied to Repertoires and RepertoireDatasets. **Specification arguments:** - low_count_limit (int): The inclusive minimal count value in order to retain a given sequence. - remove_without_count (bool): Whether the sequences without a reported count value should be removed. - remove_empty_repertoires (bool): Whether repertoires without sequences should be removed. Only has an effect when remove_without_count is also set to True. If this is true, this preprocessing cannot be used with :ref:`TrainMLModel` instruction, but only with :ref:`DatasetExport` instruction instead. - batch_size (int): number of repertoires that can be loaded at the same time (only affects the speed when applying this filter on a RepertoireDataset) **YAML specification:** .. indent with spaces .. code-block:: yaml preprocessing_sequences: my_preprocessing: - my_filter: CountPerSequenceFilter: remove_without_count: True remove_empty_repertoires: True low_count_limit: 3 batch_size: 4 """def__init__(self,low_count_limit:int,remove_without_count:bool,remove_empty_repertoires:bool,batch_size:int,result_path:Path=None):super().__init__(result_path)self.low_count_limit=low_count_limitself.remove_without_count=remove_without_countself.remove_empty_repertoires=remove_empty_repertoiresself.batch_size=batch_size