Skip to main content
Pre-release

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",
    "labels": "glasser360_labels.csv",
    "space": "MNI152NLin2009cAsym"
}
Tractography configuration

Specifies the tractography dataset, the folder containing its .trk or .trk.gz files, and its reference space.

{
    "name": "HCP1065",
    "tracts": "hcp1065_avg_tracts_trk",
    "space": "MNI152NLin2009aAsym"
}

Notes:

  • All paths are relative to the corresponding configuration file.
  • NIfTI files can be uncompressed (.nii) or gzipped (.nii.gz).
  • The space field can specify either a standard space supported by TemplateFlow (e.g., MNI152NLin2009cAsym) or a relative path to a reference NIfTI file (.nii or .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.
--sc_distance_threshold 5.0 Float above 0.0 Threshold for distance filtering of tracts endpoints in structural connectivity computation.
--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.

Outputs

TODO

Dependencies

pyLQT relies on the following libraries:

  • numpy
  • nibabel
  • pandas
  • scipy
  • requests
  • dipy
  • templateflow
  • networkx
  • antspyx

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.dev10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyLQT 1.0.dev10
File Size Uploaded Provenance Actions
pylqt-1.0.dev10.tar.gz 31.8 kB Without provenance Details for pylqt-1.0.dev10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyLQT 1.0.dev10
File Interpreter ABI Platform Actions
pylqt-1.0.dev10-py3-none-any.whl Python 3 none any Details for pylqt-1.0.dev10-py3-none-any.whl

Total release size: 66.0 kB

Release files / pylqt-1.0.dev10.tar.gz

Download URL pylqt-1.0.dev10.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8298a19cabda84c5678b52c7393843e3b12dd49bc19a3ced1c617ed6effc4c97
BLAKE2b-256 checksum
How to use checksums
e65efc662e3c2cebfafc4387e53902f3cd1c564e48234e06c3f45a9b9a6d3455
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.dev10-py3-none-any.whl

Download URL pylqt-1.0.dev10-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ecb6e06489d242c13c46f4f28c38abc09d3170559f92da75978a0943718b527
BLAKE2b-256 checksum
How to use checksums
3ee67a6cb7e23beb3d5243d3f87caa1f31738b51f57083a248acabc6c32ae651
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.dev10

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page