An efficient framework for cleaning, standardizing, and processing biological mutation data.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mutcleaner-0.8.0.tar.gz.
File metadata
- Download URL: mutcleaner-0.8.0.tar.gz
- Upload date:
- Size: 168.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ff8ee6f438f8eb4b5d83b3f9480cf1752a443dd5efa8bcf096efb6f6fd43bdb
|
|
| MD5 |
1296184da15d417f0b2af6b3fa0a68f4
|
|
| BLAKE2b-256 |
6192ce6b4a4a2f437d1089b417c470a293c8eaa9ea80d524866dccae1f6625f1
|
File details
Details for the file mutcleaner-0.8.0-py3-none-any.whl.
File metadata
- Download URL: mutcleaner-0.8.0-py3-none-any.whl
- Upload date:
- Size: 165.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a36b91d45c874b73277b1dfc9a5da0add1c6f4437ccb217b8bce0cc750d3c49b
|
|
| MD5 |
6862204d2bbb07211f58c3ed493e78e1
|
|
| BLAKE2b-256 |
500cc8cb11a4e1bb4649756f9f6e9e2ce9de9d7dccd5a50a567cfdb8cf61da1c
|