Introduction

1. Overview

ML-QTL is a machine learning-based QTL mining tool that evaluates the significance of associations between genome-wide SNPs and phenotypes based on the predictive power of regression models. It uses a sliding window algorithm to accurately locate candidate QTL regions. This tool is released as a Python package and is suitable for efficient mining of phenotype-associated genes and molecular breeding research.

2. Features

  • Efficiently processes large-scale genomic data using genotype files in plink binary format

  • Supports various regression models (default: decision tree regression, random forest regression, and support vector regression)

  • Generates sliding window prediction results, outputs results, and creates plots

  • Calculates the importance of SNPs within genes

  • Supports multi-process parallelism

  • Provides both command-line interface and Python API usage options

3. Installation

3.1 Install via pip

Before installation, it is recommended to create a virtual environment to avoid dependency conflicts with other projects (optional).

python -m venv venv
source venv/bin/activate

Install the package from PyPI:

pip install mlqtl

# Use a domestic mirror source
pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple mlqtl

Attention

Starting from version 2.3.0, numpy no longer provides binary packages for Linux systems with Glibc versions below 2.28. See the link. If you are using an older Linux system, you need to install a lower version of numpy.

If you encounter installation issues, you can try the following methods:

# Force install numpy binary wheel package
pip install mlqtl --only-binary=numpy

# Or install a specific version of numpy
pip install numpy==2.2.6 mlqtl

3.2 Install from source

  1. Download the source code

# Clone the repository from GitHub
git clone https://github.com/huanglab-cbi/mlqtl.git

# Download from our website
wget https://cbi.njau.edu.cn/mlqtl/download/source_code.tar.gz
  1. Navigate to the code directory

cd mlqtl
  1. Install dependencies

pip install -r requirements.txt
  1. Build the package

pip install build
python -m build
  1. Install the package

pip install dist/mlqtl-{version}-py3-none-any.whl

3.3 Use prebuilt files

If you are using Windows and do not have Python installed, you can use precompiled binary packages. Please visit our download page to get the latest version.

After downloading, extract it to any directory, and then run the following command in CMD or PowerShell:

mlqtl.exe --help