mutcleaner.cleaners.rbd_antibody_cleaner#
Functions
|
Execute the RBD antibody cleaning pipeline. |
|
Create the RBD antibody cleaning pipeline. |
Classes
|
Configuration for the RBD antibody cleaner. |
- class mutcleaner.cleaners.rbd_antibody_cleaner.RBDAntibodyCleanerConfig(pipeline_name='RBDAntibody pipeline', num_workers=16, validate_config=True, reference_sequences=<factory>, target_name_aliases=<factory>, column_mapping=<factory>, filters=<factory>, drop_na_columns=<factory>, type_conversions=<factory>, fallback_reference_sequence=None, require_known_reference_sequence=True, validate_mut_workers=16, process_workers=16, label_columns=<factory>, primary_label_column='label')[source]#
Bases:
BaseCleanerConfigConfiguration for the RBD antibody cleaner.
- Attributes:
- reference_sequencesDict[str, str]
Canonical RBD reference sequences keyed by target/reference name.
- target_name_aliasesDict[str, str]
RBD target alias-to-canonical-name mapping.
- column_mappingDict[str, str]
Mapping from raw source column names to standardized column names consumed by the RBD antibody cleaner.
- filtersDict[str, Any]
Filter conditions applied before mutation processing.
- drop_na_columnsList[str]
Columns that must be present after filtering.
- type_conversionsDict[str, str]
Data type conversion specifications for label columns.
- fallback_reference_sequenceOptional[str]
Reference sequence used when a row has an unknown reference name.
- require_known_reference_sequencebool
Whether reference names must be found in
reference_sequences.- validate_mut_workersint
Worker count for mutation validation.
- process_workersint
Worker count for sequence materialization.
- label_columnsList[str]
Label columns retained through the pipeline.
- primary_label_columnstr
Label column written into the final
MutationDataset.- pipeline_namestr
Pipeline name.
Methods
from_dict(config_dict)Create configuration object from dictionary
from_json(json_path)Load configuration from JSON file
get_summary()Get a human-readable summary of the configuration
merge(partial_config)Merge partial configuration with current configuration
to_dict([exclude_callables])Convert configuration to dictionary
to_json(json_path, **json_kwargs)Save configuration to JSON file
validate()Validate the configuration
- column_mapping: Dict[str, str]#
- drop_na_columns: List[str]#
- fallback_reference_sequence: str | None = None#
- filters: Dict[str, Any]#
- label_columns: List[str]#
- pipeline_name: str = 'RBDAntibody pipeline'#
- primary_label_column: str = 'label'#
- process_workers: int = 16#
- reference_sequences: Dict[str, str]#
- require_known_reference_sequence: bool = True#
- target_name_aliases: Dict[str, str]#
- type_conversions: Dict[str, str]#
- validate()[source]#
Validate the configuration
This method should be implemented by subclasses to perform specific validation logic.
- Raises:
ValueError – If configuration is invalid
- Return type:
None
- validate_mut_workers: int = 16#
- mutcleaner.cleaners.rbd_antibody_cleaner.clean_rbd_antibody_dataset(pipeline)[source]#
Execute the RBD antibody cleaning pipeline.
- Return type:
Tuple[Pipeline,MutationDataset]