Metadata-Version: 2.4
Name: laax
Version: 1.0.0
Summary: Local Ancestry Analysis in Crossbred Populations
Home-page: https://github.com/kkokay07/pq-genetics/tree/main/Local%20ancestry%20analysis
Author: Dr. Kanaka K. K., PhD, ARS
Author-email: "Dr. Kanaka K. K., PhD, ARS" <kkokay07@gmail.com>
License: MIT
Keywords: genomics,ancestry,admixture,bioinformatics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: scipy>=1.7.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

---
editor_options: 
  markdown: 
    wrap: 72
---

# README

## 🧬 Local Ancestry Analysis Notebook

**LAAX** (Local Ancestry Analysis in Crossbred Populations) is a
comprehensive Python package for genome-wide local ancestry inference in
crossbred populations. It integrates **PLINK**, **ADMIXTURE**,
and **LAMP** into a streamlined, automated pipeline.

### 🚀 Features

-   **Automated Pipeline**: End-to-end local ancestry analysis

-   **Quality Control**: Robust filtering and preprocessing with PLINK

-   **Global Ancestry**: Population structure analysis using ADMIXTURE

-   **Local Ancestry**: Fine-scale ancestry segments with LAMP

-   **Interactive Notebook**: Original Colab notebook for exploratory
    analysis

-   **Visualization**: Comprehensive plots and summary statistics

-   **Dual Usage**: Available as both Python package and Google Colab
    notebook

### 📦 Installation

### From PyPI

pip install laax

### ⚙️ Dependencies

LAAX requires these external tools to be installed and available in your
system **PATH**:

-   **PLINK** (v1.9+): For genotype data processing

-   **ADMIXTURE**: For global ancestry estimation

-   **LAMP**: For local ancestry inference

### 🏁 Quick Start

### Basic Usage:

laax --target MyBreed\
--ancestors Anc1 Anc2\
--input genotypes\
--chr-set 30\
--output my_results

### Advanced Usage:

laax --target MyBreed\
--ancestors Anc1 Anc2\
--input genotypes\
--chr-set 30\
--output my_results\
--maf 0.05\
--hwe 1e-6\
--geno 0.1\
--mind 0.1

### 💡 Command Line Usage

laax --target TARGET --ancestors ANCESTOR1 ANCESTOR2 --input INPUT
[options]

### Required Arguments:

-   `--target TARGET`: Target population name

-   `--ancestors ANCESTORS ANCESTORS`: Two ancestral population names

-   `--input INPUT`: PLINK file prefix (without .bed/.bim/.fam
    extension)

-   `--chr-set:` Number of chromosomes (default: 26)

### Optional Arguments:

-   `--output OUTPUT`: Output directory (default: laax_results)

-   `--maf MAF`: Minor allele frequency threshold (default: 0.05)

-   `--hwe HWE`: HWE threshold (default: 1e-6)

-   `--geno GENO`: SNP missingness threshold (default: 0.1)

-   `--mind MIND`: Individual missingness threshold (default: 0.1)

-   `--plink-path PLINK_PATH`: Path to PLINK executable (auto-detected)

-   `--admixture-path ADMIXTURE_PATH`: Path to ADMIXTURE executable
    (auto-detected)

-   `--lamp-path LAMP_PATH`: Path to LAMP executable (auto-detected)

### 📊 Output

The pipeline generates the following outputs in the specified output
directory:

-   ✅ **Quality-controlled genotype data** (PLINK format)

-   🌍 **Global ancestry proportions** (ADMIXTURE Q-files)

-   🧬 **Local ancestry segments** (LAMP output)

-   📈 **Ancestry visualization plots**

-   📋 **Summary statistics and composition reports**

-   🔍 **Significant genomic regions**

-   📝 **Pipeline execution logs and configuration**

### 🛠 Troubleshooting

### Common Issues:

-   **Tool not found**: Ensure PLINK, ADMIXTURE, LAMP are in system PATH
    or specify paths explicitly

-   **Memory errors**: Use smaller datasets or increase system memory

-   **Installation fails**: Try `pip install --upgrade laax`

-   **File format errors**: Verify PLINK binary format (.bed, .bim,
    .fam) exists

-   **Chromosome set mismatch**: Adjust `--chr-set` parameter for your
    organism

## 👨‍🔬 About the Author

**Dr. Kanaka K. K., PhD, ARS**\
Scientist\
School of Bioinformatics and Computational Biology [ICAR-Indian
Institute of Agricultural Biotechnology,
Ranchi](https://iiab.icar.gov.in/) \> [Be like
IIAB!:](https://www.researchgate.net/publication/379512649_ICAR-IIAB_Annual_Report-_2023)
IIAB is like yogic center where all the sciences (Plant, Animal,
Aquatic,Mibrobiology, IT) meet to address emerging issues in food
production.

## 🔎 Spy on me

-   [Google
    Scholar](https://scholar.google.com/citations?hl=en&user=0dQ7Sf8AAAAJ&view_op=list_works&sortby=pubdate)
-   [GitHub: kkokay07](https://github.com/kkokay07)
-   [ResearchGate](https://www.researchgate.net/profile/Kanaka-K-K/research)
-   [Institute Website](https://iiab.icar.gov.in/staff/dr-kanaka-k-k/)
