Metadata-Version: 2.4
Name: pyLQT
Version: 1.0.dev1
Summary: Python version of LQT from Griffis et al. 2021 (https://www.sciencedirect.com/science/article/pii/S2213158221000838)
Author-email: Antonin HUDRY <hudryantoninm@gmail.com>
License-Expression: GPL-3.0-only
Keywords: LQT,lqt,lesion,brain,
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Healthcare Industry
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.0
Requires-Dist: nibabel>5.0
Requires-Dist: pandas>3.0
Requires-Dist: scipy>1.15
Requires-Dist: requests>2.0
Requires-Dist: dipy>1.10
Requires-Dist: templateflow
Dynamic: license-file

# pyLQT
Python library to revamp the work on LQT, since it is no longer actively maintained. 

# install

Make sure to update your python environment with the `requirements.txt`: `pip install -r requirements.txt`

# Running pyLQT

The main pyLQT pipeline can be run using the `full_pipeline.py` file.

### Usage

```bash
python full_pipeline.py \
    --lesion_cfg <path/to/lesion_config> \
    --atlas_cfg <path/to/atlas_config> \
    --tracts_cfg <path/to/tracts_config> \
    --out_folder <path/to/output> \
    --spared_threshold 
```

| Argument             | Required | Default | Description                                                                                                                |
| -------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| `--lesion_cfg`    | Yes      | —       | Path to the lesion configuration file (`.json`).                                   |
| `--atlas_cfg`        | Yes      | —       | Path to the atlas configuration file (`.json`).                                                                                      |
| `--tracts_cfg`           | No       | `None`  | Path to the tracts configuration file (`.json`).                        |
| `--out_folder`       | Yes      | —       | Path to the output folder.                                                                                                 |
| `--spared_threshold` | No       | `0.5`   | Threshold between 0 and 1 used to define spared parcel-to-parcel connectivity.                                             |
| `--delete_tmp`       | No       | `True`  | Whether to delete the temporary files generated during processing.                                                         |

### Configuration files

The CLI version of pyLQT relies on 3 configuration files, one for the lesions, one for the atlas and one for the tracts:

- Lesions: "cohort_name": name of the cohort of lesion used mainly for the naming of subsequent files; "lesion_folder": relative folder (should be next the config file) containing all the lesion niftis. The folder is scanned integrally so that all niftis in the folder and subfolders are processed; "space": world space in which the lesion are registered, can be a nifti directly given as relative path (with extensions) or a standard space name that will be fetched via templateflow (i.e. MNI152NLin2009cAsym).
- Atlas: "name": name of the atlas used mainly for naming subsequent files; "atlas": relative path to nifti file corresponding to atlas; "atlas_labels": relative path to `.csv` file containing the labels of the atlas. Format should contain columns "Parcel" and "Label", corresponding to the parcel number inside the nifti and the name of the parcel respectively; "space": world space in which the lesion are registered, can be a nifti directly given as relative path (with extensions) or a standard space name that will be fetched via templateflow (i.e. MNI152NLin2009cAsym).

Note: niftis can be given as raw or gzipped niftis (`.nii` or `.nii.gz`)
