Metadata-Version: 2.4
Name: alex123-tlg
Version: 0.7.1
Summary: This tool generates `target lists` (spectral libraries) for identifying lipid molecule and fragment m/z values in FTMS, MS2, and MS3 data.
Author-email: Sergii Mamedov <sergii.mamedov@embl.de>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: ftms,gui,lipidomics,mass-spectrometry,ms2,ms3,target-list
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: MacOS X
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Requires-Python: >=3.11
Requires-Dist: pandas~=2.3.0
Requires-Dist: pyside6-essentials~=6.10.0
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-qt; extra == 'test'
Description-Content-Type: text/markdown

# ALEX123-TLG (Target List Generator)

This tool generates `target lists` (spectral libraries) for identifying lipid molecule and fragment m/z values in FTMS, MS2, and MS3 data.

## Overview

ALEX123-TLG loads lipid tables exported for each MS level, lets you define filtering criteria (lipid class, species, adduct, category, polarity, and C/DB/OH chain indices), and exports a filtered "target list" together with a reusable filter configuration. MS2/MS3 additionally support a fragment filter, and MS1 supports isotope compilation.

## Features

- Multi-criterion filtering combined with OR logic
- Fragment filtering for MS2/MS3 (applied as a final AND)
- Chain index filtering (C/DB/OH) with min/max ranges and even/odd options
- Polarity filtering (positive/negative/neutral)
- Isotope compilation for MS1 (¹³C isotopologues)
- Save and load filter configurations (`.lxt` files)
- Cross-platform (Windows, macOS, Linux)

## Requirements

- Python >= 3.11

PySide6 and pandas are installed automatically as dependencies.

## Installation

```bash
pip install alex123-tlg
```

## Input Data Files

The application needs three TSV files: `ms1.tsv`, `ms2.tsv`, and `ms3.tsv`. By default, it looks for them in the platform-specific configuration directory:

| OS | Directory |
|----|-----------|
| Windows | `%APPDATA%\alex123-tlg\` |
| macOS | `~/Library/Application Support/alex123-tlg/` |
| Linux | `~/.config/alex123-tlg/` |

Copy `ms1.tsv`, `ms2.tsv`, and `ms3.tsv` into that directory.

## Usage

Run the application:

```bash
alex123-tlg
```

Or via the Python module:

```bash
python -m alex123_tlg
```

Then, in the app:

1. **Select a working directory** -- where output files are saved.
2. **Switch to the MS1, MS2, or MS3 tab.**
3. **Add filtering criteria** -- lipid class, species, adduct, category, polarity.
4. **Set chain index filters** (optional) -- C, DB, and OH index ranges.
5. **Configure fragment filters** (MS2/MS3 only).
6. **Click "Run"** to preview filtered results.
7. **Click "Save"** to export the target list and filter configuration.

## Output Files

Saved to the selected working directory:

| File | Description |
|------|-------------|
| `targetlist_ms1.txt` | Filtered MS1 target list (TSV) |
| `targetlist_ms2.txt` | Filtered MS2 target list (TSV) |
| `targetlist_ms3.txt` | Filtered MS3 target list (TSV) |
| `targetlist_ms1.lxt` | MS1 filter configuration (JSON) |
| `targetlist_ms2.lxt` | MS2 filter configuration (JSON) |
| `targetlist_ms3.lxt` | MS3 filter configuration (JSON) |

## License

alex123-tlg is licensed under the **GNU General Public License v3.0 or later**
([full text](https://www.gnu.org/licenses/gpl-3.0.html)). The `LICENSE` file is included in
the package distribution.

This application uses PySide6 (Qt for Python) under the **GNU Lesser General Public License v3.0
(LGPLv3)**. PySide6 and Qt are not part of this project; they are installed from PyPI and remain
under their own license.