MutCleaner
MutCleaner is an extensible Python toolkit for cleaning and standardizing biological mutation datasets, integrating dataset-specific cleaning pipelines with core abstractions for protein, nucleotide, and codon-level mutation representations.
- Documentation: https://xulab-research.github.io/MutCleaner
- Cleaning Examples: https://xulab-research.github.io/MutCleaner/user_guide/supported_datasets.html
Overview
MutCleaner is an extensible Python toolkit for cleaning, standardizing, and analyzing biological mutation datasets. It currently focuses on protein variant data while providing core abstractions for DNA, RNA, protein sequences, and codon-level mutation representations.
The package combines dataset-specific cleaning pipelines with reusable sequence and mutation utilities, enabling reproducible preprocessing of large-scale mutational datasets for downstream bioinformatics and machine learning analyses.
Key Capabilities
- Mutation dataset cleaning and standardization: Harmonize mutation annotations, sequences, labels, and metadata across heterogeneous biological mutation datasets.
- Sequence representation and validation: Utilities for DNA, RNA, and protein sequences, including validation, transcription, reverse transcription, translation, and mutation application.
- Mutation parsing and transformation: Tools for parsing amino-acid and codon-level mutations, inferring mutations from sequences, applying mutations to reference sequences, and converting codon mutations into amino-acid changes.
- Modular pipeline architecture: A composable pipeline interface for building reproducible dataset-cleaning workflows.
- Parallel and scalable dataset processing: Multi-core utilities for mutation validation, mutation application, and sequence-based mutation inference, supporting efficient processing of large tabular mutation datasets.
Installation
Requirements
- Python 3.13+
- Dependencies are automatically installed via pip.
Install via pip
pip install mutcleaner
Development Installation
git clone https://github.com/xulab-research/MutCleaner.git MutCleaner
cd MutCleaner
pip install -e .
To install development dependencies for testing and documentation:
pip install -e ".[dev]"
Package Structure
mutcleaner/
├── cleaners/ # Reusable cleaners and dataset-specific pipelines
│ ├── basic_cleaners.py # Reusable basic cleaning functions
│ ├── base_config.py # Shared cleaner configuration
│ └── *_cleaner.py # Dataset-specific cleaning pipelines
├── core/ # Core data structures and processing logic
│ ├── alphabet.py # Biological alphabet definitions and validation
│ ├── codon.py # Codon table and sequence translation utilities
│ ├── constants.py # Shared biological constants
│ ├── dataset.py # Standard dataset abstraction and export logic
│ ├── mutation.py # Mutation parsing, representation and validation
│ ├── pipeline.py # Reusable data cleaning pipeline framework
│ ├── sequence.py # DNA, RNA and protein sequence abstractions
│ └── types.py # Shared type aliases and annotations
└── utils/ # General helper functions for downloading and I/O
Module Overview
mutcleaner.cleaners
The cleaners module provides both reusable cleaning functions and predefined dataset-specific cleaning pipelines.
basic_cleaners.py contains general-purpose cleaning functions that can be reused across different datasets, such as column checking, missing value handling, sequence validation, mutation validation, and common formatting operations.
base_config.py defines shared configuration used by dataset cleaners, such as common column names, required fields, and reusable cleaner settings.
*_cleaner.py files define dataset-specific cleaning pipelines. Each file is designed for a particular dataset or benchmark and combines reusable cleaning functions into a complete workflow.
mutcleaner.core
The core module contains the fundamental data structures and processing logic used throughout MutCleaner.
alphabet.py defines biological alphabets and validation rules for DNA, RNA, and protein sequences.
codon.py provides codon table utilities and sequence translation functionality.
constants.py stores shared biological constants, such as amino acid symbols, nucleotide symbols, complements, and stop codon definitions.
dataset.py defines the standard dataset abstraction used to store, manage, validate, and export cleaned mutation datasets.
mutation.py provides mutation parsing, mutation representation, and mutation validation logic.
pipeline.py defines the reusable data cleaning pipeline framework, including pipeline steps, execution order, and artifact tracking.
sequence.py defines biological sequence abstractions, including DNA, RNA, and protein sequence classes.
types.py stores shared type aliases and annotations used across the package.
mutcleaner.utils
The utils module contains helper functions that support common operations outside the core cleaning logic.
It includes utilities for downloading source files, handling paths, extracting files, checking file existence, and managing common input/output operations.
Quick Start
See the Data Cleaners Usage Guide for more examples.
Supported Datasets
Core Features
Sequence Data Manipulation
- Sequence validation: Validate DNA, RNA, and protein sequences against predefined alphabets.
- Sequence transformation: Support transcription, reverse transcription, translation, and reverse-complement operations.
- Batch processing: Process large tabular mutation datasets through reusable cleaning utilities.
Mutation Analysis
- Mutation parsing: Parse amino-acid and codon-level mutation annotations.
- Mutation inference: Infer mutation annotations by comparing reference and mutated sequences.
- Mutation transformation: Apply mutation annotations to reference sequences and convert codon-level mutations into amino-acid changes.
Data Cleaning and Preprocessing
- Standardization: Harmonize mutation names, sequences, labels, and metadata across heterogeneous datasets.
- Duplicate handling: Remove or aggregate redundant mutation records according to dataset-specific rules.
- Dataset-specific cleaners: Provide reusable cleaning pipelines for commonly used mutation datasets.
Pipeline Architecture
- Modular design: Compose cleaning workflows from reusable processing components.
- Parallel processing: Use multi-core processing for mutation validation, mutation application, and sequence-based mutation inference.
- Progress tracking: Monitor long-running cleaning tasks with progress bars and structured execution summaries.
Citation
If you use MutCleaner in your research, please cite:
@software{mutcleaner,
title={
MutCleaner: An efficient framework for cleaning, standardizing, and processing biological mutation data.
},
author={Ziyu Shi and Yuxiang Tang},
year={2026},
url={https://github.com/xulab-research/MutCleaner}
}
License
This project is licensed under the Apache License 2.0.
Unless otherwise stated, the source code, model architecture, training scripts, inference scripts, and released model weights/checkpoints are licensed under Apache-2.0.
Datasets used in this project may be subject to their original licenses and terms of use. Please refer to the corresponding dataset sources for details.
This software is provided for research purposes and is not intended for clinical diagnosis, medical decision-making, or direct therapeutic use.
Metadata
Release files for mutcleaner 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mutcleaner-0.9.0.tar.gz | 175.0 kB | Without provenance | Details for mutcleaner-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mutcleaner-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for mutcleaner-0.9.0-py3-none-any.whl |
Total release size: 344.2 kB
Release files / mutcleaner-0.9.0.tar.gz
| Download URL | mutcleaner-0.9.0.tar.gz |
|---|---|
| Size | 175.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e047ad9d2e70d43081eea7fdf2cd7ae24f5c3372e52f2e286e3b7f39c01596f
|
|
BLAKE2b-256 checksum How to use checksums |
1df1e8dfbb00a235c7626f77abf53c80a6a74fcca45bf2e14749657386140503
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / mutcleaner-0.9.0-py3-none-any.whl
| Download URL | mutcleaner-0.9.0-py3-none-any.whl |
|---|---|
| Size | 169.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69f3e73f04240a9248725f6e78c0601fd90972dbfc346fe8ad77319676be5f6d
|
|
BLAKE2b-256 checksum How to use checksums |
b325d4ed7d52c055d084c12e8f3b8b90ec3e1577057915c271ad6250c1451bb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Security for mutcleaner 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.