This release is a pre-release and may not be stable for production use.
pyLQT
pyLQT, standing for “Python Lesion Quantification Toolkit”, is a toolbox designed for analysis brain-lesioned patients scans with minimal resources, regrouping several metrics for lesion quantification. It is a sucessor to LQT [1] which was originally developped on MATLAB and remastered on R [2].
The metrics are divided into three main domains:
- Grey matter: lesion effects on grey-matter regions and parcels.
- White matter: lesion effects on white-matter tracts and streamlines.
- Network: lesion effects on structural or functional brain networks.
installation
pip install pyLQT
Running pyLQT
Configuration files
pyLQT uses three JSON configuration files to define the lesion cohort, atlas, and tractography dataset. Each file specifies the relevant data paths and reference space. For the simplest usage, only the lesion cohort configuration file is required, in which case the atlas and tractogram files are automatically downloaded.
Lesion configuration
Defines the lesion cohort, the folder containing the lesion NIfTI files, and their reference space.
{
"cohort_name": "ExampleCohort",
"lesion_folder": "lesions",
"space": "MNI152NLin6Asym"
}
Atlas configuration
Specifies the atlas NIfTI file, its corresponding label CSV, and its reference space. The CSV must contain a Parcel column with parcel indices matching the atlas NIfTI and a Label column with the corresponding parcel names.
{
"name": "glasser360",
"atlas": "glasser360.nii.gz",
"atlas_labels": "glasser360_labels.csv",
"space": "MNI152NLin2009cAsym"
}
Tractography configuration
Specifies the tractography dataset, the folder containing its .trk files, the folder containing its reference NIfTI files, and its reference space.
{
"name": "HCP1065",
"tracts": "hcp1065_avg_tracts_trk",
"references": "hcp1065_avg_tracts",
"space": "MNI152NLin2009aAsym"
}
Notes:
- All paths are relative to the corresponding configuration file.
- NIfTI files can be uncompressed (
.nii) or gzipped (.nii.gz). - The
spacefield can specify either a standard space supported by TemplateFlow (e.g.,MNI152NLin2009cAsym) or a relative path to a reference NIfTI file (.niior.nii.gz). - All paths and names above are examples and should be adapted to your dataset.
basic use
Below is the simplest usage that only requires the lesion cohort configuration file. By default, the Glasser360 atlas and the HCP1065 tractogram are downloaded if not provided in the arguments.
pyLQT --lesion_cfg <path/to/lesion_config> --out_folder <path/to/outputs>
| Argument | Default | Options / Range | Description |
|---|---|---|---|
--lesion_cfg |
— | Path to a .json file |
Path to the lesion cohort configuration file. |
--atlas_cfg |
None |
Path to a .json file or None |
Path to the atlas configuration file. |
--tracts_cfg |
None |
Path to a .json file or None |
Path to the tracts configuration file. |
--out_folder |
— | Path to a directory | Path to the output folder. |
--registration_type |
syn |
syn, affine |
Registration type used to transform the lesion and atlas from their respective spaces to tract space. |
--spared_threshold |
0.5 |
Float between 0 and 1 |
Threshold used to define spared parcel-to-parcel connectivity. |
--delete_tmp |
True |
True, False |
Whether to delete temporary files generated during processing. |
Dependencies
pyLQT relies on the following libraries:
numpynibabelpandasscipyrequestsdipytemplateflownetworkx
Links
- Source
- documentation [TODO, deploy via github]
- PyPI
References
[1] Griffis et al. (2021). Lesion Quantification Toolkit: A MATLAB software tool for estimating grey matter damage and white matter disconnections in patients with focal brain lesions. NeuroImage: Clinical.
[2] Dworkin Jordan (https://github.com/jdwor/LQT)
Metadata
Release files for pyLQT 1.0.dev4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylqt-1.0.dev4.tar.gz | 31.3 kB | Without provenance | Details for pylqt-1.0.dev4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylqt-1.0.dev4-py3-none-any.whl | Python 3 | none | any | Details for pylqt-1.0.dev4-py3-none-any.whl |
Total release size: 65.0 kB
Release files / pylqt-1.0.dev4.tar.gz
| Download URL | pylqt-1.0.dev4.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ed65a28321a36d1359457bbc79e8c67b6f014699b48934046bb88b910673b86
|
|
BLAKE2b-256 checksum How to use checksums |
f48dc3d47213e5fd87dffe6fa1c76dbb5fe8ea8b9777a63388285b81eeea3030
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / pylqt-1.0.dev4-py3-none-any.whl
| Download URL | pylqt-1.0.dev4-py3-none-any.whl |
|---|---|
| Size | 33.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a59f83e451d2c6c3745ff1cf5d3eac6e0d11b8bff73e82b3b3d9218b5ae92c72
|
|
BLAKE2b-256 checksum How to use checksums |
588fba5049acf5c6370ddc41d0d5329d38e2aefeddfb912f708ede9eefc2699b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for pyLQT 1.0.dev4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.